I have a .net standard 2.0 class library project with the following setup:
- At the solution root folder (the .sln file location) I have a nuget package (Which also hasother nuget dependencies) a co-worker wrotewhich I need to use. I configured this location as a package source and added the nuget packagethrough package manager.
- At the solution root folder (the .sln file location) I also have 'dlls' folder in which i havea dll I added refence to manually (through refence manager)
This is the class library with the dependencies
I try pack at using VS 19 right clicking on the project and 'Pack' option. But only the class library dll is added
So I also tried packing it with .nuspec
file to take all files from release folder
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"><metadata> ... ...<!-- Dependencies are automatically installed when the package is installed --><dependencies> <group targetFramework=".NETStandard2.0"></group></dependencies> </metadata><files><file src=".\bin\Release\netstandard2.0\*.*" target="lib\netstandard2.0" /></files></package>
And it does pack all dlls. But There I get an exception when running the application which used the generated nuget package.
System.PlatformNotSupportedException: 'Windows Data Protection API (DPAPI) is not supported on this platform.'
I am testing it using .net core 3.0
console app.
If I use the class library I try to pack by adding it as a project reference to the console app, it all works perfect.
What am I doing wrong?
EDIT:
As @Lasse V. Karlsen requested, I tried unpacking the nuget and add the dlls as references and did noticed some problem.
So, Again this is the class library with the nuget package my co-worker wrote. with the packages refernced by that package extended, Pay attention to System.Security.Cryptography.ProtectedData
When add my nuget package to console app:
But when I try to unpack the package and add the dlls refernces, I get an error on 3 of the dlls System.Security.Cryptography.ProtectedData
depends on. Those which marked at the pictures.I get this error when try to add them: