Command
Invoke-DotNetRepositoryRelease
Repository-wide .NET package release workflow (discover, version, pack, publish).
Syntax
Invoke-DotNetRepositoryRelease [-AlignPackageVersions] [-CertificateStore <CurrentUser|LocalMachine>] [-CertificateThumbprint <String>] [-Configuration <Release|Debug>] [-ExcludeDirectories <String[]>] [-ExcludeProject <String[]>] [-ExpectedVersion <String>] [-ExpectedVersionMap <IDictionary>] [-ExpectedVersionMapAsInclude] [-ExpectedVersionMapUseWildcards] [-IncludePrerelease] [-IncludeProject <String[]>] [-IncludeSymbols] [-NugetCredentialSecret <String>] [-NugetCredentialSecretEnvName <String>] [-NugetCredentialSecretFilePath <String>] [-NugetCredentialUserName <String>] [-NugetSource <String[]>] [-OutputPath <String>] [-OverwriteSignedAssemblies] [-OverwriteSignedPackages] [-Path <String>] [-Publish] [-PublishApiKey <String>] [-PublishApiKeyEnvName <String>] [-PublishApiKeyFilePath <String>] [-PublishFailFast] [-PublishSource <String>] [-SignDependencyAssemblies] [-SkipAssemblySigning] [-SkipDuplicate] [-SkipPack] [-SkipPackageSigning] [-TimeStampServer <String>] [<CommonParameters>]#Parameter set:
All Parameter SetsDescription
Discovers packable projects, resolves a repository-wide version (supports X-pattern), updates csproj versions, packs, and optionally publishes packages.
Examples
Release packages using X-pattern versioning
Invoke-DotNetRepositoryRelease -Path . -ExpectedVersion '1.2.X' -Publish -PublishApiKey $env:NUGET_API_KEYRelease packages with exclusions and custom sources
Invoke-DotNetRepositoryRelease -Path . -ExpectedVersion '2.0.X' -ExcludeProject 'OfficeIMO.Visio' -NugetSource 'C:\Packages' -Publish -PublishApiKey $env:NUGET_API_KEYParameters
- -AlignPackageVersions SwitchParameter
- Align projects sharing an X-pattern to one next version based on the highest current package version in that group.
- -CertificateStore CertificateStoreLocation
- Certificate store location used when searching for the signing certificate.
- Possible values:
CurrentUser,LocalMachine - -CertificateThumbprint String
- Certificate thumbprint used for signing packages.
- -Configuration String
- Build configuration (Release/Debug).
- Possible values:
Release,Debug - -ExcludeDirectories String[]
- Directory names to exclude from discovery.
- -ExcludeProject String[]
- Project names to exclude (csproj file name without extension).
- -ExpectedVersion String
- Expected version (exact or X-pattern, e.g. 1.2.X).
- -ExpectedVersionMap IDictionary
- Per-project expected versions (hashtable: ProjectName = Version).
- -ExpectedVersionMapAsInclude SwitchParameter
- When set, only projects listed in ExpectedVersionMap are processed.
- -ExpectedVersionMapUseWildcards SwitchParameter
- Allow wildcards (*, ?) in ExpectedVersionMap keys.
- -IncludePrerelease SwitchParameter
- Include prerelease versions when resolving versions.
- -IncludeProject String[]
- Project names to include (csproj file name without extension).
- -IncludeSymbols SwitchParameter
- Create portable .snupkg symbol packages alongside primary packages.
- -NugetCredentialSecret String
- Credential secret/token for private NuGet sources.
- -NugetCredentialSecretEnvName String
- Name of environment variable containing the credential secret/token.
- -NugetCredentialSecretFilePath String
- Path to a file containing the credential secret/token.
- -NugetCredentialUserName String
- Credential username for private NuGet sources.
- -NugetSource String[]
- NuGet sources (v3 index or local path) used for version resolution.
- -OutputPath String
- Optional output path for packages.
- -OverwriteSignedAssemblies SwitchParameter
- Explicitly replaces existing Authenticode assembly signatures.
- -OverwriteSignedPackages SwitchParameter
- Explicitly replaces existing NuGet package signatures.
- -Path String
- Root repository path.
- -Publish SwitchParameter
- Publish packages to the feed.
- -PublishApiKey String
- API key used for publishing packages.
- -PublishApiKeyEnvName String
- Name of environment variable containing the publish API key.
- -PublishApiKeyFilePath String
- Path to a file containing the publish API key.
- -PublishFailFast SwitchParameter
- Stop on the first publish/signing failure.
- -PublishSource String
- NuGet feed source for publishing.
- -SignDependencyAssemblies SwitchParameter
- Also sign copied dependency assemblies from build output folders.
- -SkipAssemblySigning SwitchParameter
- Skip Authenticode signing of build outputs before packages are created.
- -SkipDuplicate SwitchParameter
- Skip duplicates when pushing packages.
- -SkipPack SwitchParameter
- Skip dotnet pack step.
- -SkipPackageSigning SwitchParameter
- Skip signing generated NuGet packages.
- -TimeStampServer String
- Timestamp server URL used while signing packages.
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.