ARTICLE AD BOX
I have a solution containing a class library project. That class library project includes a native library, which I place in the subdirectory runtimes/<rid>/native. I have the .csproj configured to pack the library files into the runtimes folder within the .nupkg file, and when I make a <PackageReference> to this built package, the consuming project's deps.json is updated to find the native library in its per-RID folder.
But, if I make a project reference to the class library within the same solution, that project's deps.json does not get populated with the necessary details.
So, code that refers to this class library as a NuGet package works, but if that <PackageReference> is replaced with a <ProjectReference>, the exact same code fails to run because it doesn't know where to find the native library file.
Is there a way to configure the class library .csproj so that project references within the same solution get the same correct deps.json configuration as projects that refer to it via the NuGet package?
Explore related questions
See similar questions with these tags.
