I have a C# solution that contains two net472 projects: Foo.csproj
, and Bar.csproj
.
The projects are in classic format (no SDK version).
The projects use PackageRefernce as package management.
Foo.csproj
depends on Bar.csproj
.Bar.csproj
isn't a nuget package.
I want to create a nuget package of Foo.
I followed this instruction, and I execute the command msbuild -t:pack Foo.csproj
, that produces the Foo.nupkg
file.
The problem is that Foo.nupkg
contains Foo.dll
, but it doesn't contain Bar.dll
.So, when I try to install via NuGet the package Foo
, I receive the following error:
Unable to resolve dependency 'Bar'.
What I'm missing?I hope I have provided all the necessary info.