Subatomix.Build.Packaging.PowerShellModule 1.2.0-pre0

This is a prerelease version of Subatomix.Build.Packaging.PowerShellModule.
There is a newer version of this package available.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Subatomix.Build.Packaging.PowerShellModule" Version="1.2.0-pre0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Subatomix.Build.Packaging.PowerShellModule" Version="1.2.0-pre0" />
                    
Directory.Packages.props
<PackageReference Include="Subatomix.Build.Packaging.PowerShellModule">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Subatomix.Build.Packaging.PowerShellModule --version 1.2.0-pre0
                    
#r "nuget: Subatomix.Build.Packaging.PowerShellModule, 1.2.0-pre0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Subatomix.Build.Packaging.PowerShellModule@1.2.0-pre0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Subatomix.Build.Packaging.PowerShellModule&version=1.2.0-pre0&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Subatomix.Build.Packaging.PowerShellModule&version=1.2.0-pre0&prerelease
                    
Install as a Cake Tool

Subatomix.Build.Packaging.PowerShellModule

PowerShell module packaging support for .NET SDK-style projects.

Status

Build NuGet NuGet

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.

There are no supported framework assets in this package.

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