AzureSignTool.Cli.win-x64
2026.11111.11200
dotnet add package AzureSignTool.Cli.win-x64 --version 2026.11111.11200
NuGet\Install-Package AzureSignTool.Cli.win-x64 -Version 2026.11111.11200
<PackageReference Include="AzureSignTool.Cli.win-x64" Version="2026.11111.11200" />
<PackageVersion Include="AzureSignTool.Cli.win-x64" Version="2026.11111.11200" />
<PackageReference Include="AzureSignTool.Cli.win-x64" />
paket add AzureSignTool.Cli.win-x64 --version 2026.11111.11200
#r "nuget: AzureSignTool.Cli.win-x64, 2026.11111.11200"
#:package AzureSignTool.Cli.win-x64@2026.11111.11200
#addin nuget:?package=AzureSignTool.Cli.win-x64&version=2026.11111.11200
#tool nuget:?package=AzureSignTool.Cli.win-x64&version=2026.11111.11200
π AzureSignTool
A code signing tool that uses Azure Key Vault for performing the signing process. Similar to signtool in the Windows SDK, but leverages Azure Key Vault certificates for secure, centralized key management.
π¦ Based on AzureSignTool by Kevin Jones.
π Table of Contents
- β‘ Quick Start
- π₯ Installation
- π Authentication Methods
- π» Usage Examples
- π Command Reference
- π Supported Formats
- π¦ Exit Codes
- π§ Troubleshooting
- π Building & Continuous Integration
- π Requirements
- π License
β‘ Quick Start
# Install the tool
dotnet tool install --global AzureSignTool.Cli
# Sign a file using Azure CLI credentials (for local development)
AzureSignTool sign `
-kvu https://my-vault.vault.azure.net `
-kvc my-certificate-name `
-act AzureCliCredential `
-tr http://timestamp.digicert.com `
myfile.exe
π₯ Installation
Install as a global .NET tool. The package is AzureSignTool.Cli; it installs the
AzureSignTool command:
dotnet tool install --global AzureSignTool.Cli
# then, from any shell:
AzureSignTool --version
The tool is published self-contained: NuGet picks the package for your machine's runtime
identifier (win-x64, win-arm64 or linux-x64) and ships the matching .NET runtime inside it,
so no .NET runtime has to be installed. You only need a .NET 10 or later CLI to install or
update the tool, and dotnet can be removed from the machine afterwards β the installed shim
invokes AzureSignTool.exe directly.
On a runtime identifier without a package (for example osx-arm64), installation stops with
The tool does not support the current architecture or operating system.
π Authentication Methods
This tool supports multiple Azure authentication methods. For production scenarios, use the --azure-credential-type (-act) parameter to explicitly specify the credential type rather than relying on DefaultAzureCredential.
π― Choosing the Right Credential Type
| Scenario | Credential Type | When to Use |
|---|---|---|
| βΈοΈ Kubernetes / Containers | WorkloadIdentityCredential |
CI/CD pipelines in AKS with workload identity federation |
| βοΈ Azure VMs / App Services | ManagedIdentityCredential |
Applications running on Azure compute resources |
| π CI/CD with Service Principal | ClientSecretCredential |
Automated builds with explicit client credentials |
| π₯οΈ Local Development | AzureCliCredential |
Developers authenticated via az login |
| π Interactive Use | InteractiveBrowserCredential |
Manual signing operations requiring user login |
| π§ Environment Variables | EnvironmentCredential |
Applications configured via Azure environment variables |
β οΈ Why Avoid DefaultAzureCredential in Production?
According to Microsoft's documentation, DefaultAzureCredential is designed for development convenience but is not recommended for production because it:
- β Tries multiple credential types in sequence, causing unpredictable behavior
- β May attempt unnecessary authentication methods, impacting performance
- β Makes troubleshooting more difficult due to its "magic" discovery chain
Using --azure-credential-type provides:
- β Explicit control over which authentication method is used
- β Better security by limiting credential discovery
- β Improved performance by avoiding unnecessary auth attempts
- β Easier troubleshooting with predictable authentication flow
βΉοΈ Combining parameters: a credential type consumes the parameters it needs, so
-kvi,-kvtand-kvsare valid alongsideClientSecretCredential,-kvi/-kvtalongsideInteractiveBrowserCredential, and-kvaalongsideAccessTokenCredential. The legacy selectors--azure-key-vault-accesstoken,--azure-key-vault-client-idand--azure-key-vault-managed-identitycannot be combined with a type that does not consume them.
π» Usage Examples
π₯οΈ Using Azure CLI Credential (Local Development)
AzureSignTool sign -du "https://example.com" `
-fd sha384 `
-kvu https://my-vault.vault.azure.net `
-act AzureCliCredential `
-kvc my-certificate-name `
-tr http://timestamp.digicert.com `
-td sha384 `
-v `
myfile.exe
βΈοΈ Using Workload Identity (Kubernetes / Containers)
AzureSignTool sign -du "https://example.com" `
-fd sha384 `
-kvu https://my-vault.vault.azure.net `
-act WorkloadIdentityCredential `
-kvc my-certificate-name `
-tr http://timestamp.digicert.com `
-td sha384 `
-v `
myfile.exe
βοΈ Using Managed Identity (Azure VMs / App Services)
AzureSignTool sign -du "https://example.com" `
-fd sha384 `
-kvu https://my-vault.vault.azure.net `
-act ManagedIdentityCredential `
-kvc my-certificate-name `
-tr http://timestamp.digicert.com `
-td sha384 `
-v `
myfile.exe
π Using Client Secret (CI/CD Pipelines)
AzureSignTool sign -du "https://example.com" `
-fd sha384 `
-kvu https://my-vault.vault.azure.net `
-act ClientSecretCredential `
-kvi 01234567-abcd-ef012-0000-0123456789ab `
-kvt 01234567-abcd-ef012-0000-0123456789ab `
-kvs <client-secret> `
-kvc my-certificate-name `
-tr http://timestamp.digicert.com `
-td sha384 `
-v `
myfile.exe
π Using Interactive Browser
AzureSignTool sign -du "https://example.com" `
-fd sha384 `
-kvu https://my-vault.vault.azure.net `
-act InteractiveBrowserCredential `
-kvi 01234567-abcd-ef012-0000-0123456789ab `
-kvt 01234567-abcd-ef012-0000-0123456789ab `
-kvc my-certificate-name `
-tr http://timestamp.digicert.com `
-td sha384 `
-v `
myfile.exe
π‘ Tip: Use
--helporsign --helpfor detailed parameter information.
π Command Reference
π Azure Key Vault Authentication
| Parameter | Short | Required | Description |
|---|---|---|---|
--azure-key-vault-url |
-kvu |
β | Fully qualified URL of the key vault (e.g., https://my-vault.vault.azure.net) |
--azure-key-vault-certificate |
-kvc |
β | Name of the certificate for signing |
--azure-key-vault-certificate-version |
-kvcv |
β | Specific certificate version (defaults to latest) |
--azure-key-vault-client-id |
-kvi |
βοΈ | Client ID for service principal authentication |
--azure-key-vault-client-secret |
-kvs |
βοΈ | Client secret for service principal authentication |
--azure-key-vault-tenant-id |
-kvt |
βοΈ | Tenant ID for service principal authentication |
--azure-key-vault-accesstoken |
-kva |
βοΈ | Pre-acquired access token for authentication |
--azure-key-vault-managed-identity |
-kvm |
βοΈ | Use DefaultAzureCredential (not recommended for production) |
--azure-credential-type |
-act |
βοΈ | Recommended. Explicit credential type (see Authentication Methods) |
--azure-authority |
-au |
β | Azure Authority URL (for sovereign clouds) |
β = Required | β = Optional | βοΈ = Required depending on authentication method
ποΈ Available Credential Types (-act)
| Value | Description |
|---|---|
DefaultAzureCredential |
π Tries multiple credential types in sequence (not recommended for production) |
ManagedIdentityCredential |
βοΈ Azure Managed Identity |
WorkloadIdentityCredential |
βΈοΈ Workload identity federation (Kubernetes/containers) |
ClientSecretCredential |
π Service principal with client secret |
InteractiveBrowserCredential |
π Interactive browser authentication |
EnvironmentCredential |
π§ Authenticate using environment variables |
AzureCliCredential |
π₯οΈ Authenticate using Azure CLI |
AzurePowerShellCredential |
π Authenticate using Azure PowerShell |
AccessTokenCredential |
π« Use a pre-acquired access token |
βοΈ Signing Options
| Parameter | Short | Default | Description |
|---|---|---|---|
--description |
-d |
β | Description of the signed content (same as /d in signtool) |
--description-url |
-du |
β | URL with more information about the content (same as /du in signtool) |
--file-digest |
-fd |
sha256 | Hash algorithm for file digest: sha1, sha256, sha384, sha512 |
--timestamp-rfc3161 |
-tr |
β | RFC3161 timestamp server URL (recommended) |
--timestamp-authenticode |
-t |
β | Legacy Authenticode timestamp server (deprecated) |
--timestamp-digest |
-td |
sha256 | Hash algorithm for timestamp: sha1, sha256, sha384, sha512 |
--additional-certificates |
-ac |
β | Additional certificates for the chain (can be specified multiple times) |
βοΈ Processing Options
| Parameter | Short | Default | Description |
|---|---|---|---|
--continue-on-error |
-coe |
β | Continue signing remaining files if one fails |
--input-file-list |
-ifl |
β | Path to text file containing files to sign (one per line) |
--skip-signed |
-s |
β | Skip files that are already signed |
--append-signature |
-as |
β | Append signature instead of replacing (Windows 11+) |
--max-degree-of-parallelism |
-mdop |
4 | Maximum concurrent signing operations |
--sign-nuget-contents |
-snc |
β | Sign binaries inside NuGet packages |
--sign-nuget-contents-filter |
-sncf |
β | Glob pattern to filter which binaries to sign inside NuGet packages |
π€ Output Options
| Parameter | Short | Description |
|---|---|---|
--verbose |
-v |
π Show detailed output including authentication info |
--quiet |
-q |
π Suppress all output |
--colors |
β | π¨ Enable colored output |
π¬ Advanced Options
| Parameter | Short | Description |
|---|---|---|
--page-hashing |
-ph |
Generate page hashes for executable files |
--no-page-hashing |
-nph |
Suppress page hashes for executable files |
π Supported Formats
This tool supports the same formats as the Windows SDK signtool:
| Format | Extensions |
|---|---|
| π₯οΈ Portable Executable | .exe, .dll |
| π¦ Cabinet Files | .cab |
| πΏ Windows Installer | .msi, .msix |
| π± APPX/MSIX Packages | .appx, .msix, .appxbundle, .msixbundle |
| π¦ NuGet Packages | .nupkg, .snupkg |
π¦ NuGet Package Signing
When signing NuGet packages, the tool supports two types of signing:
1οΈβ£ Package-Level Signature (Default)
Creates a NuGet author signature (.signature.p7s) for the package itself.
AzureSignTool sign `
-kvu https://my-vault.vault.azure.net `
-act ClientSecretCredential `
-kvi <client-id> -kvt <tenant-id> -kvs <client-secret> `
-kvc my-certificate `
-tr http://timestamp.digicert.com `
MyPackage.1.0.0.nupkg
2οΈβ£ Package + Content Signing (Optional)
Signs both the package and all binaries inside it (.dll, .exe, .winmd).
AzureSignTool sign `
-kvu https://my-vault.vault.azure.net `
-act ClientSecretCredential `
-kvi <client-id> -kvt <tenant-id> -kvs <client-secret> `
-kvc my-certificate `
-tr http://timestamp.digicert.com `
--sign-nuget-contents `
MyPackage.1.0.0.nupkg
3οΈβ£ Filtered Content Signing
Sign only specific binaries inside the package using a glob pattern (useful when packages contain third-party DLLs that are already signed).
AzureSignTool sign `
-kvu https://my-vault.vault.azure.net `
-act ClientSecretCredential `
-kvi <client-id> -kvt <tenant-id> -kvs <client-secret> `
-kvc my-certificate `
-tr http://timestamp.digicert.com `
--sign-nuget-contents `
--sign-nuget-contents-filter "ISynergy.Framework.*" `
MyPackage.1.0.0.nupkg
βΉοΈ Note: Symbol packages (
.snupkg) do not support package-level signatures per NuGet specifications. The certificate must have the Code Signing enhanced key usage (EKU).
π¦ Exit Codes
| Code | Name | Description |
|---|---|---|
0 |
β S_OK | All files signed successfully |
0x20000001 |
β οΈ Partial Success | Some files signed, some failed |
0xA0000002 |
β All Failed | All files failed to sign |
0x80070057 |
β E_INVALIDARG | Argument validation failed (nothing was signed) |
0x80131539 |
β E_PLATFORMNOTSUPPORTED | sign was run on a non-Windows OS or older Windows |
π§ Troubleshooting
π Enable Verbose Logging
Use the --verbose (-v) flag to see detailed authentication and signing information:
AzureSignTool sign `
-kvu https://my-vault.vault.azure.net `
-act WorkloadIdentityCredential `
-kvc my-certificate `
-v `
myfile.exe
The verbose output includes:
- π Which credential type is being used
- βοΈ Configuration parameters (Tenant ID, Client ID, etc.)
- π§ Environment variables being checked
- β οΈ Warnings if using
DefaultAzureCredentialin production
π Common Authentication Issues
βΈοΈ WorkloadIdentityCredential (Kubernetes)
Ensure these environment variables are set:
| Variable | Description |
|---|---|
AZURE_TENANT_ID |
π’ Azure AD tenant ID |
AZURE_CLIENT_ID |
π Application (client) ID |
AZURE_FEDERATED_TOKEN_FILE |
π Path to the projected service account token |
βοΈ ManagedIdentityCredential (Azure VMs / App Services)
- β Verify the Azure resource has a managed identity assigned
- β Ensure the identity has appropriate Key Vault access policies or RBAC permissions
π₯οΈ AzureCliCredential
# Ensure you're logged in
az login
# Verify your account
az account show
π AzurePowerShellCredential
# Ensure you're logged in
Connect-AzAccount
# Verify your context
Get-AzContext
π Building & Continuous Integration
π» Local build
dotnet restore AzureSignTool.Cli.slnx
dotnet build AzureSignTool.Cli.slnx -c Release -p:GeneratePackageOnBuild=false -nodeReuse:false
dotnet test AzureSignTool.Cli.slnx -c Release --no-build
dotnet pack AzureSignTool.Cli.slnx -c Release --no-build -o packages
Set MSBUILDDISABLENODEREUSE=1 (and pass -nodeReuse:false) when building locally β MSBuild
node reuse is what exhausts memory on developer machines (see .ai/project/preferences.md):
$env:MSBUILDDISABLENODEREUSE = "1"
$env:DOTNET_CLI_USE_MSBUILD_SERVER = "0"
π Pipeline
CI/CD runs on GitHub Actions: .github/workflows/ci.yml.
It replaced the former Azure DevOps pipeline.
| Job | Runner | What it does |
|---|---|---|
build |
ubuntu-latest |
restore β build β pack β verify the package β test with opencover coverage β upload nupkgs and test-results |
release |
windows-2025 |
sign the packages with the AzureSignTool built by the build job, through Azure Key Vault (OIDC) β the NuGet signature plus an Authenticode signature on our own assemblies inside the package (--sign-nuget-contents-filter "AzureSignTool*") β push to nuget.org (trusted publishing). A push to main publishes a release through the production environment and creates the <version> tag + GitHub release. Pull requests build, test and pack only; they never publish or create a tag |
Build and tests are platform-neutral; only the native signing path is Windows-bound
(mssign32/crypt32). The two test classes that exercise it β
CodeSigningServiceTests and MemoryCertificateStoreTests β carry
[OSCondition(OperatingSystems.Windows)] and are skipped on Linux. The release job stays on
Windows because the tool itself refuses to run elsewhere.
Versions come from the workflow clock in UTC as yyyy.1MMdd.1HHmm (2026.11027.11034); pull
request builds use a -preview package suffix for their uploaded artifacts, but are never
published. No file is bumped for a release: the tag and GitHub release use the build number
directly (no v prefix).
π Repository configuration
Nothing here is needed for the build and test job β only for publishing. One command creates
everything, using an authenticated gh CLI:
./scripts/Set-GitHubSettings.ps1
- Environments (Settings β Environments):
productiongates a release frommainwith required reviewers (-Reviewers, defaultismailhassani). Pull requests do not publish, so no second environment is needed. - Variables:
BUILD_CONFIGURATION(optional, defaults toRelease),AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_KEYVAULT_URI,AZURE_SIGNING_CERTIFICATE,TIMESTAMP_URL. No subscription id is needed: the release job requests the OIDC token directly and signs through the Key Vault access policy, so the identity needs no Azure role assignment. - Secret:
NUGET_USERβ the nuget.org username used for trusted publishing (ismailhassani, not theI-Synergyorganization). The release job fails fast with a clear message when it is missing.
nuget.org trusted publishing pins the production environment name.
Signing is skipped when AZURE_KEYVAULT_URI is not configured β the release job logs a warning and
publishes unsigned packages in that case.
π Requirements
| Requirement | Version |
|---|---|
| π₯οΈ Runtime OS | Windows 10 or later (signing calls mssign32/crypt32) |
| βοΈ .NET runtime (to run) | Not required β the package bundles it (win-x64, win-arm64, linux-x64) |
| π¦ .NET CLI (to install/update) | 10.0 or later |
| π οΈ Build/test OS | Any β Windows, Linux or macOS |
| π§° .NET SDK (for building) | 11.0.100 (global.json, rollForward: latestFeature) |
π License
This project is licensed under the MIT License.
π Acknowledgments
This project is based on AzureSignTool by Kevin Jones.
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 |
|---|---|---|
| 2026.11111.11200 | 104 | 11/11/2026 |
| 2026.11111.11120 | 84 | 11/11/2026 |