I would like to pack nuget package using a .csproj
file. Following command will be executed:
nuget pack MyProject.csproj -IncludeReferencedProjects
In the project folder I have two nuspec files, one depending to the MyProject.csproj and another which will be used to make a different package but depending on this project to. Folder structure looks like:
-ProjectFolder
|-MyProject.csproj
|-AdditionalMyProject.nuspec
|-MyProject.nuspec
When calling the nuget pack
command, it always takes the first nuspec file (AdditionalMyProject.nuspec
- lower naming) to get metadata for nuget package but the correct nuspec should be MyProject.nuspec
(matching the name of project file).
Is there a way to tell nuget pack which nuspec it should use when packing a csproj?
Something like this:
nuget pack MyProject.csproj -nuspec MyProject.nuspec -IncludeReferencedProjectsenter