How can I resolve this System.Web.Helpers mismatch when deploying the Azure website?

I do not know why I cannot understand this. I am a bit in a DLL, strongly calling hell. Here's what happens:

  • I am using Visual Studio 2012 RC to configure an MVC4 site on .NET 4.0.
  • I am trying to use Gravatar Razor Assistant in the library Microsoft.Web.Helpers
  • It works on my machine, but after deploying to Azure via Git, I get the following exception when calling the Gravatar helper:

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

It looks like I have a mismatch between the version System.Web.Helpersinstalled on the GAC, wherever I go on my Azure site, and what I'm aiming for.

Here is what I tried:

  • Copy Local = true
  • Hacking my own _bin_deployableAssemblies folder since there is no menu option described on Phil Haack's blog
  • Removing extended assembly information in a .csproj file for System.Web.Helpers

In addition, I have the following assembly binding redirection in the web.config file:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
      ...
</runtime>

Is anyone ??

+5
source share
1 answer

You said you tried copylocal = true, but did you ensure that the assembly was deployed to the server?

Possible problems:

• .gitignore has a .dll filter

FTP , bin

+3

All Articles