Packaging TargetFramework Specific Native Libraries #14049
Unanswered
Danielku15
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My question relates to this NuGet Feature: https://learn.microsoft.com/en-us/nuget/create-packages/native-files-in-net-packages
I am in the need to ship some additional native libraries together with my NuGet and normally I would place them within
runtimes\win-x64\native
to have them available at runtime.For our anti-tampering / licensing system I have a tooling which will create native libraries specific to the .net DLLs as a post-build step. Hence I have dlls like this after compilation:
How can I now setup my nupkg that on compilation against a .net target framework the correct
MyManagedAntiTamper.dll
will be copied to the output directory? I'd need a feature likeruntimes\win-x64\lib\net48\
but for native libs:runtimes\win-x64\native\net48
Unless I can avoid it, I want to avoid naming the
MyManagedAntiTamper.dll
likeMyManagedAntiTamper_net48.dll
+MyManagedAntiTamper_net9.0.dll
and let them being copied to all target framework outputs.Beta Was this translation helpful? Give feedback.
All reactions