[ASP.NET] Error “Could not load file or assembly ‘Microsoft.Web.Infrastructure’” after deploying on Windows Azure

August 12th, 2014 | Posted by Tom in .NET | Article | ASP.NET | Azure | Read: 27,275

As Iā€™m working on a small ASP.NET MVC 5 application, I wanted to deploy it on Windows Azure to test it. Thanks to Visual Studio, the deployment was really easy but, as soon as I tried to browse the website, I received the following error message:

Could not load file or assembly ‘Microsoft.Web.Infrastructure, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35′ or one of its dependencies. The system cannot find the file specified.


After searching a bit, it appears that the error is due to the reference Microsoft.Web.Infrastructure.dll that is not deployed automatically with your app. To resolve the issue, just select the reference, go to the properties and set ā€œCopy Localā€ to true:


Once this is done, deploy your website again and now, it should works fine!


Happy coding!

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Add Comment Register

Leave a Reply