dotnet-nuget-sign(1)
dotnet-nuget-sign π
okay bestie, quick vibe check before we dive in: this whole page is for .NET 6 SDK and later versions βοΈ (so if you're on something ancient, this is not your moment, sorry π). This is the manual page for the dotnet-nuget-sign command, and I'm gonna walk you through it like we're texting at 2am. π«Ά
β¨ NAME β¨
dotnet-nuget-sign β signs all the NuGet packages matching the first argument with a certificate. π
πΈ SYNOPSIS πΈ
dotnet nuget sign [<package-path(s)>]
[--certificate-path <PATH>]
[--certificate-store-name <STORENAME>]
[--certificate-store-location <STORELOCATION>]
[--certificate-subject-name <SUBJECTNAME>]
[--certificate-fingerprint <FINGERPRINT>]
[--certificate-password <PASSWORD>]
[--hash-algorithm <HASHALGORITHM>]
[-o|--output <OUTPUT DIRECTORY>]
[--overwrite]
[--timestamp-hash-algorithm <HASHALGORITHM>]
[--timestamper <TIMESTAMPINGSERVER>]
[-v|--verbosity <LEVEL>]
dotnet nuget sign -h|--help
π¦ DESCRIPTION π¦
So the dotnet nuget sign command signs all the packages matching the first argument with a certificate. That certificate β the one with the private key β can come from a file, or from a certificate that's already installed in a certificate store, which you point at with either a subject name or a SHA-1 fingerprint. π
Heads up bestie, this command requires a certificate root store that's valid for both code signing and timestamping. Also, this command might not be supported on some combinations of operating system and .NET SDK. For more information, see NuGet signed package verification.
π ARGUMENTS π
package-path(s)β the file path to the package(s) you want signed. You can pass in multiple arguments to sign multiple packages at once. Slay. β¨
π OPTIONS π
--certificate-path <PATH>β the file path to the certificate used for signing the package.
Real talk: this option currently supports only PKCS12 (PFX) files that contain the certificate's private key. So don't come at it with anything else, it's not the vibe.
--certificate-store-name <STORENAME>β the name of the X.509 certificate store to search for the certificate. Defaults to"My", the X.509 certificate store for personal certificates. You should use this option when you're specifying the certificate via--certificate-subject-nameor--certificate-fingerprint. ποΈ--certificate-store-location <STORELOCATION>β the name of the X.509 certificate store used to search for the certificate. Defaults to"CurrentUser", the X.509 certificate store used by the current user. Use this one when specifying the certificate via--certificate-subject-nameor--certificate-fingerprint. π--certificate-subject-name <SUBJECTNAME>β the subject name of the certificate, used to search a local certificate store for it. The search is a case-insensitive string comparison using the value you supply, and it finds all certificates whose subject name contains that string β regardless of the other subject values. You can point at the store with--certificate-store-nameand--certificate-store-location.
okay so this option currently supports only a single matching certificate in the result. If there are multiple matching certificates, or literally none, the sign command will fail. no pressure lol π
--certificate-fingerprint <FINGERPRINT>β the fingerprint of the certificate, used to search a local certificate store for it.
Starting with .NET 9, this option can be used to specify the SHA-1, SHA-256, SHA-384, or SHA-512 fingerprint of the certificate. However, a NU3043 warning is raised when a SHA-1 certificate fingerprint is used, because it's no longer considered secure. In .NET 10 and later versions, that warning is elevated to an error. Only SHA-2 family fingerprints (SHA-256, SHA-384, and SHA-512) are supported.
All pre-.NET 9 versions of the .NET SDK continue to accept only SHA-1 certificate fingerprint. periodt. π
--certificate-password <PASSWORD>β the certificate password, if it needs one. If a certificate is password protected but you don't hand over a password, the sign command will fail.
The sign command only supports non-interactive mode. There won't be any prompt for a password at run time. so put it in the command, bestie, it's not gonna ask nicely. π
--hash-algorithm <HASHALGORITHM>β the hash algorithm used to sign the package. Defaults toSHA256. Possible values areSHA256,SHA384, andSHA512. π-o|--outputβ the directory where the signed package should be saved. If this option isn't specified, then by default the original package is overwritten by the signed package. πΎ--overwriteβ indicates that the current signature should be overwritten. By default the command will fail if the package already has a signature.--timestamp-hash-algorithm <HASHALGORITHM>β the hash algorithm used by the RFC 3161 timestamp server. Defaults toSHA256. β±οΈ--timestamper <TIMESTAMPINGSERVER>β URL to an RFC 3161 timestamping server. π-v|--verbosity <LEVEL>β sets the verbosity level of the command. Allowed values areq[uiet],m[inimal],n[ormal],d[etailed], anddiag[nostic]. The default isminimal. For more information, see<xref:Microsoft.Build.Framework.LoggerVerbosity>. π’-?|-h|--helpβ prints out a description of how to use the command. the classic "help me please" button, we love her. π«Ά
β EXAMPLES β
- Sign
foo.nupkgwith certificatecert.pfx(not password protected):
dotnet nuget sign foo.nupkg --certificate-path cert.pfx
- Sign
foo.nupkgwith certificatecert.pfx(password protected):
dotnet nuget sign foo.nupkg --certificate-path cert.pfx --certificate-password password
- Sign
foo.nupkgwith a certificate (password protected) that matches the specified SHA-256 fingerprint in the default certificate store (CurrentUser):
dotnet nuget sign foo.nupkg --certificate-fingerprint B2C40F2F8775D7B7EBEB76BD5A9D3A4BC3F4B8A4D8D7C5F8A4C6B3E7A9E2D5F1 --certificate-password password
- Sign
foo.nupkgwith a certificate (password protected) that matches the specified subject name"Test certificate for testing signing"in the default certificate store (CurrentUser):
dotnet nuget sign foo.nupkg --certificate-subject-name "Test certificate for testing signing" --certificate-password password
- Sign
foo.nupkgwith a certificate (password protected) that matches the specified SHA-256 fingerprint in the certificate storeCurrentUser:
dotnet nuget sign foo.nupkg --certificate-fingerprint B2C40F2F8775D7B7EBEB76BD5A9D3A4BC3F4B8A4D8D7C5F8A4C6B3E7A9E2D5F1 --certificate-password password --certificate-store-location CurrentUser --certificate-store-name Root
- Sign multiple NuGet packages β
foo.nupkgand all.nupkgfiles in the directory specified β with certificatecert.pfx(not password protected):
dotnet nuget sign foo.nupkg c:\mydir\*.nupkg --certificate-path cert.pfx
- Sign
foo.nupkgwith certificatecert.pfx(password protected), and timestamp withhttp://timestamp.test:
dotnet nuget sign foo.nupkg --certificate-path cert.pfx --certificate-password password --timestamper http://timestamp.test
- Sign
foo.nupkgwith certificatecert.pfx(not password protected) and save the signed package under a specified directory:
dotnet nuget sign foo.nupkg --certificate-path cert.pfx --output c:\signed\
- Sign
foo.nupkgwith certificatecert.pfx(not password protected) and overwrite the current signature if the package is already signed:
dotnet nuget sign foo.nupkg --certificate-path cert.pfx --overwrite
and that's the whole page, bestie!! π you just read the dotnet-nuget-sign(1) manual, dated 2025-08-29, straight from the .NET docs. go sign something iconic. πβ¨
π¦ where this page comes from
- alpine 3.24: dotnet-doc 10.0.303-r2 Β· MIT
- centos-stream 10: dotnet-host 11.0.0~rc.2.26504.105-0.10.el10 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- centos-stream 9: dotnet-host 11.0.0~rc.2.26504.105-0.11.el9 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 43: dotnet-host 10.0.12-1.fc43
- fedora 43: dotnet-host 11.0.0~rc.1.26425.128-0.10.fc43 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 10.0.12-1.fc44
- fedora 44: dotnet-host 10.0.4-1.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- fedora 44: dotnet-host 11.0.0~rc.1.26425.128-0.12.fc44 Β· 0BSD AND Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) AND APSL-2.0 AND BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause AND BSL-1.0 AND bzip2-1.0.6 AND CC0-1.0 AND CC-BY-3.0 AND CC-BY-4.0 AND CC-PDDC AND CNRI-Python AND EPL-1.0 AND GPL-2.0-only AND (GPL-2.0-only WITH GCC-exception-2.0) AND GPL-2.0-or-later AND GPL-3.0-only AND ICU AND ISC AND LGPL-2.1-only AND LGPL-2.1-or-later AND LicenseRef-Fedora-Public-Domain AND LicenseRef-ISO-8879 AND MIT AND MIT-Wu AND MS-PL AND MS-RL AND NCSA AND OFL-1.1 AND OpenSSL AND Unicode-DFS-2015 AND Unicode-DFS-2016 AND W3C-19980720 AND X11 AND Zlib
- nixpkgs unstable: dotnet-vmr 11.0.0-rc.3
- ubuntu noble: dotnet-host-10.0 10.0.12-0ubuntu1~24.04.1
- ubuntu questing: dotnet-host-10.0 10.0.9-0ubuntu1~25.10.1
- ubuntu resolute: dotnet-host-10.0 10.0.12-0ubuntu1~26.04.1
- ubuntu resolute: dotnet-host-10.0 10.0.5-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-10.0 10.0.12-0ubuntu2 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc1-0ubuntu1 Β· MIT
- ubuntu stonking: dotnet-host-11.0 11.0.0~rc3-0ubuntu1~26.10.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms