I have two class libraries in a single solution (.NET Core). One of them (cl1) is a main library and it depends on another library (cl2). I have added a .nuspec file with the required metadata only (no dependencies, no files) for the cl1 project in the project folder (same location of .csproj file) and I have set GeneratePackageOnBuild propery to true.
Whenever I am building the class library (cl1), the .nupkg is created automatically in the debug/release folder.
When I check the generated .nupkg file, I am see two strange things:
- The generated
.nuspecfile is different than what I have added in the project folder cl2is mentioned as a dependency in the newely generated.nuspecfile, but the DLL forcl2is not included in thelibfolder of the.nupkg. So, whenever I consume this package in another solution, I am getting the errorNo packages exist with this id in source(s)for thecl2.
I have surfed in internet, but was not able to find a proper solution for the above error.