I created a .NET application originally with .NET 4.5 but then when I realized my server only had 4.0 I reverted the application to 4.0 by going to the property pages option of the project, clicking the build tab and then selecting .NET framework 4.0 as the Target Framework. Now the app works locally as explained in this post, but on the server it does not. So it seems like there is some aspect of .NET 4.5 that is left over in the project which is being called and is causing the application to crash. The stack trace I am getting is:
[MissingMethodException: Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'.]
Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode.Start() +0
[InvalidOperationException: The pre-application start initialization method Start on type Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode threw an exception with the following error message: Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'..]
System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +11802638
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): The pre-application start initialization method Start on type Microsoft.ScriptManager.MSAjaxv45.PreApplicationStartCode threw an exception with the following error message: Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'..]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11791440
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4928277
Does anyone know how to fix this?
A mistake was made during upload. :)