I have .net assembly which uses native dll. IIS copies files to 'Temporary ASP.NET Files' folder. And I want IIS copies dll together with native dll. I tried to use manifest dependencies but without success. I heard that I can user csc option -linkresource for native dll, as described here
Compile A.cs into a DLL, link to a native DLL N.dll, and put the output in the Global Assembly Cache (GAC). In this example, both A.dll and N.dll will reside in the GAC.
csc -linkresource:N.dll -t:library A.cs gacutil -i A.dll
I want to use this option but
This compiler option is unavailable in Visual Studio and cannot be changed programmatically.
But they forced me do not use visual studio project and build it by csc directly. It is a too robust task.
Can I change the project file to accomplish this task?
I saw this article but it is outdated and does not contain any useful information. I use 2019 Visual Studio.