A dotnet new
template that creates a project for a binary PowerShell module.
Targets PowerShell Core v6.0.0 or higher.
dotnet new -i FiftyProtons.Templates.PSCore
mkdir MyModule; cd MyModule
dotnet new ps-core-module
dotnet restore
dotnet publish -c release -o $PWD/bin/release
powershell
Import-Module ./bin/release/MyModule.dll
Get-Greeting -Name 'PowerShell'
dotnet restore
dotnet pack
- And to use locally-built templates:
dotnet new -i src/Templates.PSCore/content