Azure SDK 2.1 - Could not load file or assembly 'System.Web.WebPages.Deployment,

163 Views Asked by At

I installed Azure SDK 2.1 on our development server using the Web Platform Installer. After the update finished, our test project, which is a WCF Service, is now broken. When you browse to the project (which was working before the update), you get the following error:

Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Everything I search references MVC. We don't use MVC, and never have, and it should not even be installed on the server. Why on earth am I getting this error message?

Edit: I discovered through testing on another server that installing "Windows Azure SDK for .NET (VS 2010 SP1) - 2.1" includes MVC 4.0 as a dependency. Why does this get installed?

2

There are 2 best solutions below

0
On BEST ANSWER

I have been able to get this working by simply uninstalling the MVC 4.0 package that was installed by the Azure SDK update.

Why this is even necessary is beyond me, but at least it is working now and hopefully this can help others with a similar issue.

0
On

Create a New project and test then:

I resolved this problem adding line below in web.config of project... before I marked in MANAGE NUGET "Microsoft.AspNet.Mvc/5.1.2", "Microsoft ASP.NET Web Pages/3.1.2", I try anything but nothing works (really!! uninstall VS and read a lot articles)

  <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>

Good lucky