I use third party library in my project. Call it like MainLibNET.dll
. I added this library in References
of my project. This dll has dependencies w
I followed option 2a (1c) as mentioned in this blog, and it works beautifully.
In Visual Studio, right click the project and Add Existing Items for each native DLL
Right click each added DLL and choose Properties; set Build Action=Content and Copy to Output Directory = Copy Always. This will cause VS to copy files to bin directory.
Add following code to Global.asax, so ASP.NET will know where to look for the native DLLs.
.
protected void Application_Start(object sender, EventArgs e)
{
String _path = String.Concat(System.Environment.GetEnvironmentVariable("PATH"), ";", System.AppDomain.CurrentDomain.RelativeSearchPath);
System.Environment.SetEnvironmentVariable("PATH", _path, EnvironmentVariableTarget.Process);
}