Subatomix.Build.Packaging.PowerShellModule
1.2.0-pre0
See the version list below for details.
dotnet add package Subatomix.Build.Packaging.PowerShellModule --version 1.2.0-pre0
NuGet\Install-Package Subatomix.Build.Packaging.PowerShellModule -Version 1.2.0-pre0
<PackageReference Include="Subatomix.Build.Packaging.PowerShellModule" Version="1.2.0-pre0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="Subatomix.Build.Packaging.PowerShellModule" Version="1.2.0-pre0" />
<PackageReference Include="Subatomix.Build.Packaging.PowerShellModule"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Subatomix.Build.Packaging.PowerShellModule --version 1.2.0-pre0
#r "nuget: Subatomix.Build.Packaging.PowerShellModule, 1.2.0-pre0"
#:package Subatomix.Build.Packaging.PowerShellModule@1.2.0-pre0
#addin nuget:?package=Subatomix.Build.Packaging.PowerShellModule&version=1.2.0-pre0&prerelease
#tool nuget:?package=Subatomix.Build.Packaging.PowerShellModule&version=1.2.0-pre0&prerelease
Subatomix.Build.Packaging.PowerShellModule
PowerShell module packaging support for .NET SDK-style projects.
Status
In use by a handful of modules.
Features
- Support for script, binary, or mixed modules
- Module manifest templates with
{VersionPrefix},{VersionSuffix}, and{Copyright}placeholders - Run and debug with F5 in Visual Studio
- Support for automated build, test, and publish
Usage
Just add a reference to this package. Now dotnet pack and Visual Studio Pack
will produce a PowerShell module. Here is a minimal example .csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Management.Automation"
Version="7.4.0" PrivateAssets="All" />
<PackageReference Include="Subatomix.Build.Packaging.PowerShellModule"
Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<Content Include="$(PowerShellItemIncludes)"
Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
</Project>
For a simple example, see this repository's test project. It can serve as a template for new PowerShell module projects. For a more complete, real-world example with automated tests, see my PSql module.
Ready to automate build-and-publish to PowerShell Gallery? See this repository's GitHub Actions workflow for an example.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0 | 676 | 12/1/2025 |
| 1.2.0-pre0 | 198 | 11/24/2025 |
| 1.1.1 | 1,549 | 5/1/2022 |
| 1.1.1-rc02 | 453 | 5/1/2022 |
| 1.1.1-rc01 | 449 | 5/1/2022 |
| 1.1.0 | 808 | 4/18/2021 |
| 1.1.0-rc03 | 435 | 4/14/2021 |
| 1.1.0-rc02 | 458 | 4/6/2021 |
| 1.1.0-rc01 | 487 | 4/4/2021 |
| 1.0.0 | 794 | 12/16/2020 |
| 1.0.0-pre05 | 546 | 12/16/2020 |
| 1.0.0-pre04 | 512 | 12/10/2020 |
| 1.0.0-pre.4 | 412 | 12/10/2020 |
| 1.0.0-pre.3 | 529 | 8/20/2020 |
| 1.0.0-pre.2 | 479 | 7/27/2020 |
| 1.0.0-pre.1 | 521 | 6/29/2020 |