0

I have an MVC website which runs perfectly locally but when I publish to Azure I get the error:

Could not load file or assembly 'EntityFramework.SqlServer' or one of its dependencies. The module was expected to contain an assembly manifest.

once I navigate to the log in page of the site.

Since the last successful publish I have updated a few NuGet packages, so I think maybe the version of EntityFramework.SqlServer.dll is wrong on the server, but surely it should have been updated during the publish?

I've included assembly binding for the dll:

  <dependentAssembly>
        <assemblyIdentity name="EntityFramework.SqlServer" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
  </dependentAssembly>

How would I check the version of the dll that is present on the server?

JK

JonnyKnottsvill
  • 1,123
  • 2
  • 16
  • 39
  • Usually this kind of problem comes in two flavors: 1) You need to set "Copy local" to true for that DLL. 2) You are using an assembly that is also in the GAC, and the versions differ. – gbellmann Apr 24 '15 at 21:56

1 Answers1

0

I solved it by FTP'ing into the site and removing the dll, then I removed and readded the dll to my project and republished. I had to do the same for EntityFramework.dll as well.

JonnyKnottsvill
  • 1,123
  • 2
  • 16
  • 39