Reputation: 25
I'm having problems with a custom .nupkg file I have created as the .nuspec file is being added to the package itself. The .nuspec file is held directly under the \src directory and I am using the following command to create the package:
nuget pack .\src\package.nuspec -Version 1.0.0.0 -OutputDirectory C:\Packages\
I am packing directly against the .nuspec file since my solution contains multiple projects each targeting a different .Net version.
Inside the package file, the two files at the root are the "[Content Types].xml" and the .nuspec file (besides the "_relS", "lib" and "package" directories).
For reference I have not yet posted the package and have just a local repository directory.
Upvotes: 1
Views: 1866
Reputation: 6260
You need to put the nuspec
file outside the src
folder
baseFolder
|- src
|- [contents]
|- [contents]
|- package.nuspec
Now, run the command in baseFolder
nuget pack package.nuspec -Version 1.0.0.0 -OutputDirectory C:\Packages\
Upvotes: 1