https://github.com/sharpjs/subatomix.build.packaging.powershellmodule
Package a .NET SDK-style project as a PowerShell module
https://github.com/sharpjs/subatomix.build.packaging.powershellmodule
msbuild packaging powershell powershell-module
Last synced: 6 months ago
JSON representation
Package a .NET SDK-style project as a PowerShell module
- Host: GitHub
- URL: https://github.com/sharpjs/subatomix.build.packaging.powershellmodule
- Owner: sharpjs
- License: isc
- Created: 2020-06-20T23:11:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-12T15:23:34.000Z (about 3 years ago)
- Last Synced: 2025-07-10T16:29:28.998Z (7 months ago)
- Topics: msbuild, packaging, powershell, powershell-module
- Language: Perl
- Homepage:
- Size: 179 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Subatomix.Build.Packaging.PowerShellModule
PowerShell module packaging support for .NET
[SDK-style](https://docs.microsoft.com/en-us/dotnet/core/tools/csproj)
projects.
## Status
[](https://github.com/sharpjs/Subatomix.Build.Packaging.PowerShellModule/actions)
[](https://www.nuget.org/packages/Subatomix.Build.Packaging.PowerShellModule)
[](https://www.nuget.org/packages/Subatomix.Build.Packaging.PowerShellModule)
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:
```xml
netcoreapp3.1
true
```
For a simple example, see this repository's
[test project](https://github.com/sharpjs/Subatomix.Build.Packaging.PowerShellModule/tree/master/test).
It can serve as a template for new PowerShell module projects.
For a more complete, real-world example with automated tests, see my
[PSql](https://github.com/sharpjs/PSql) module.
Ready to automate build-and-publish to PowerShell Gallery? See this repository's
[GitHub Actions workflow](https://github.com/sharpjs/Subatomix.Build.Packaging.PowerShellModule/blob/master/.github/workflows/build.yaml)
for an example.