I use the SimpleMembership.MVC3 package for membership management. Everything works fine during development, but when I deploy my Azure web role, it throws the following exception:
Could not load file or assembly 'WebMatrix.Data, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' or one of its dependencies. The installed manifest definition for the assembly does not match the assembly reference. (Exception from HRESULT: 0x80131040)
stack trace: [FileLoadException: could not load file or assembly 'WebMatrix.Data, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' or one of its dependencies. The installed assembly manifest definition does not match the Help assembly. (Exception from HRESULT: 0x80131040)]
WebMatrix.WebData.PreApplicationStartCode.Start () +0
[InvalidOperationException: initializing start before application Method Start as WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Failed to load file or assembly 'WebMatrix.Data, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35' one of his dependencies. The installed assembly manifest definition does not match the Help assembly. (Exception from HRESULT: 0x80131040).]
System.Web.Compilation.BuildManager.InvokePreStartInitMethods (ICollection`1 methods) +11711966
System.Web.Compilation.BuildManager.CallPreStartInitMethods () +465
System.Web.Hosting.HostingEnvironment.Initialize (ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1167
[HttpException (0x80004005): initializing start before application Method Start as WebMatrix.WebData.PreApplicationStartCode threw an exception with the following error message: Failed to load file or assembly 'WebMatrix.Data, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35 'or one of its dependencies. The installed assembly manifest definition does not match the Help assembly. (Exception from HRESULT: 0x80131040).]
System.Web.HttpRuntime.FirstRequestInit (HttpContext context) +11700896 System.Web.HttpRuntime.EnsureFirstRequestInit (HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS71269 context +)
There is no WebMatrix.Data assembly that loads when installing the Nuget package. I manually added the WeBMatrix.Data.DLL file found in my Program Files / Microsoft ASP.NET directory, but the version of this assembly is 2.x, and the missing version is 1.x