#!pwsh
$clockExtensionDir = Join-Path -Path (Read-Host -Prompt "What is the path to your dotnet/interactive repo?") -ChildPath "\samples\extensions\ClockExtension"
cd $clockExtensionDir
Get-ChildItem #| ConvertTo-Json | Out-Display -MimeType "application/json"
Directory: C:\dev\interactive\samples\extensions\ClockExtension Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 4/21/2020 9:51 AM bin d---- 4/21/2020 9:51 AM obj -a--- 2/27/2020 12:25 PM 902 ClockExtension.csproj -a--- 2/28/2020 4:53 PM 2191 ClockKernelExtension.cs -a--- 2/23/2020 12:59 PM 5172 SvgClock.cs
#!pwsh
#!time
dotnet build
dotnet pack /p:PackageVersion=1.2.8
Get-ChildItem -Recurse *.nupkg
Microsoft (R) Build Engine version 16.6.0-preview-20216-03+8a8a26f9b for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... Restored C:\dev\interactive\samples\extensions\ClockExtension\ClockExtension.csproj (in 571 ms). You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview ClockExtension -> C:\dev\interactive\samples\extensions\ClockExtension\bin\Debug\netcoreapp3.1\ClockExtension.dll Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:03.04 Microsoft (R) Build Engine version 16.6.0-preview-20216-03+8a8a26f9b for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. Determining projects to restore... Restored C:\dev\interactive\samples\extensions\ClockExtension\ClockExtension.csproj (in 637 ms). You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview ClockExtension -> C:\dev\interactive\samples\extensions\ClockExtension\bin\Debug\netcoreapp3.1\ClockExtension.dll Directory: C:\dev\interactive\samples\extensions\ClockExtension\bin\Debug Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 4/21/2020 9:51 AM 17200 ClockExtension.1.2.8.nupkg
Wall time: 8416.0177ms
#i nuget:C:\dev\interactive\samples\extensions\ClockExtension\bin\Debug\
#r nuget:clockextension,1.3.0
clockextension version 1.3.0 cannot be added because version 1.2.8 was added previously.
DateTime.Now
#!clock -h
#!clock: Displays a clock showing the current or specified time. Usage: #!clock [options] Options: --hour, -o <o> The position of the hour hand -m, --minute <m> The position of the minute hand -s, --second <s> The position of the second hand -?, -h, --help Show help and usage information
#!clock --hour 1 -m 2 -s 3
Required command was not provided. Unrecognized command or argument '#!clock' Unrecognized command or argument '--hour' Unrecognized command or argument '1' Unrecognized command or argument '-m' Unrecognized command or argument '2' Unrecognized command or argument '-s' Unrecognized command or argument '3'
#r nuget:trexlib
#!t-rex -h
#!t-rex run c:\dev\t-rex
DateTime.Now
Formatter<DateTime>.Register((s,writer) => writer.Write(s.ToString() + "!"), "text/html");