Why convert NUPKG to NUSPEC?
The .nuspec holds the package manifest including id, version, authors, dependencies, and license. You may need it to inspect metadata without installing the package, re-use it as a template for a new package, or push to a private feed that requires the manifest separately.
How to convert NUPKG to NUSPEC
7-Zip OPEN-SOURCE
Right-click the .nupkg, choose 7-Zip > Open archive, select the .nuspec at the archive root, and click Extract.
NuGet Package Explorer OPEN-SOURCE
Open the .nupkg via File > Open local package, select the .nuspec in the contents panel, then use File > Save metadata as to save it as a standalone file.
Rename to .zip FREE
Rename the .nupkg extension to .zip, open in Windows Explorer or use unzip on macOS/Linux, and copy out the .nuspec from the archive root.
About these formats
A .nupkg file is a NuGet package - the standard way .NET libraries are distributed for the .NET ecosystem. It is a ZIP archive holding compiled .dll files and a .nuspec metadata manifest.…
Open .NUPKG details →A .NUSPEC file is associated with NuGet settings, a developer file.
Open .NUSPEC details →Quality & what to watch
- The
.nuspecinside a built.nupkgreflects values resolved at build time (e.g., version from the.csproj), not necessarily a hand-written manifest. - The extracted
.nuspecis complete and valid - it can be used directly withnuget packto rebuild or fork the package. - The
<files>element is usually absent in.nuspecfiles extracted from adotnet packbuild; file layout is resolved automatically at build time.
Frequently asked questions
Where in the `.nupkg` is the `.nuspec` located?
<id>.<version>.nuspec.Can I use the extracted `.nuspec` to re-pack the package?
nuget pack.What is the difference between `.nuspec` and `.nupkg`?
.nuspec is plain XML metadata only; the .nupkg is the full ZIP archive containing DLLs, the .nuspec, and all other package assets.