nuget pack csproj ('new style') does not include dependencies in resulting .nuspec #7352
Labels
Functionality:Pack
Product:NuGet.exe
NuGet.exe
Resolution:Duplicate
This issue appears to be a Duplicate of another issue
When packaging a csproj (the 'new' type generated by vs 2017 or dotnet cli - i.e. dotnet new classlib) the nuget packages dependencies included in the csproj do not get included in resulting nuspec file inside the generated package
Using dotnet pack works as expected. Also does Visual Studio build package option. I.e. these both generate the correct nuspec with dependencies.
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
NuGet Version: 4.7.1.5393
dotnet.exe --version: 2.1.402
VS version (if appropriate):15.8.4
OS version: windows 7 version 6.1 build7601: Service Pack 1
Worked before? If so, with which NuGet version:
Not sure.
Detailed repro steps so we can see the same problem (windows style path used below)
git clone https://github.com/gparlakov/nugetBug_depsDontGetIncluded
nuget restore .\nugetBug_depsDontGetIncluded\nugetBug.lib\nugetBug.lib.csproj
nuget pack nugetBug_depsDontGetIncluded\nugetBug.lib\nugetBug.lib.csproj -Build -outputDirectory ./output
Read the nuget.lib.nuspec from output\nuget.lib.1.0.0.nupkg- the deps included in nuget.lib.csproj are missing
![image](https://user-images.githubusercontent.com/3482199/46336812-85c9e400-c634-11e8-8272-c68ca9fdf547.png)
Sample Project
https://github.com/gparlakov/nugetBug_depsDontGetIncluded
The text was updated successfully, but these errors were encountered: