Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.Web.Infrastructure.dll pain

Guys I have big pain with adding reference to Microsoft.Web.Infrastructure.dll , maybe someone can help me with this.

I am trying to add a reference to Microsoft.Web.Infrastructure.dll and when I am clicking to add a reference in VS, the reference added to web.config since dll is in GAC.

If reference added this way , during deployment the dll isn't copied , and we have build script that installing this on couple servers.

I am trying to remove the dll from my gac but .... Without any success , since it is in SOME other GAC invented for .NET 4 or 4.5 (unfortunately didn't found enough info regarding this)

I've found on stack overflow resolution for the problem by running Install command in Package Manager console , but on our environment we are not allowed to connect outside the network , so connecting to nuget isn't possible because our network isn't connected to the internet according to security policy...

Anyone can suggest a way to resolve it without running package manager ?

like image 959
StringBuilder Avatar asked Aug 14 '13 14:08

StringBuilder


1 Answers

Set CopyLocal=true for Microsoft.Web.Infrastructure.dll. This will force VS to copy the binary to the bin directory during compile / deployment. Instructions for doing this can be found at http://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx.

Edit: If this doesn't work, your version of VS may require you to drop the .dll into the bin directory explicitly. See http://msdn.microsoft.com/en-us/library/ez524kew(v=vs.100).aspx for more info.

like image 129
Levi Avatar answered Nov 11 '22 15:11

Levi