I need to use native C libraries in my library (that supports several Core TFs and .NET Framework) which is published via NuGet. I configured it via a .csproj file and a runtimes folder, but I noticed that when I consume my NuGet via dotnet add package ... in some cases, the native libraries are not copied into the expected folder after consuming, however when I use the Visual Studio NuGet Package Manager and select "Manage NuGet Packages for Solution", all files are placed into correct places.
So, I assume that NuGet package manager makes more steps than just calling dotnet add package ..., but it's unclear what exactly happens.
.csproj), it will be also appreciatedcsprojs insdk styleandnon-sdk styleare processed. Now, I see that mynon-sdkproject handles .net framework TF correctly (including via PM and Install-Packagepackageway), but when I try to use .net framework insdk style, the native library is not copied into the expected place. So, some more investigation is required here. Thanks a lot!Runtimefolder of the nuget works for new sdk style project. And it is strange why it works for non-sdk projects. You should check on this document and make sure the sructure is right. Besides, please try to use net standard library project as the nuget project. Secondly, you can use content folder or lib folder to copies files or reference dlls into your main projects.