BustedSanta
BustedSanta

Reputation: 1388

Method not found: 'Void System.Web.UI.ScriptResourceDefinition

I've built a fairly simple website in using Visual Studio 2012 using .net 4.5 version.

When I uploaded the website to my server I get the following error:

Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'.

[MissingMethodException: Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'.] Microsoft.ScriptManager.WebFormsv45.PreApplicationStartCode.Start() +0

[InvalidOperationException: The pre-application start initialization method Start on type Microsoft.ScriptManager.WebFormsv45.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) +423 System.Web.Compilation.BuildManager.CallPreStartInitMethods() +306 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677

[HttpException (0x80004005): The pre-application start initialization method Start on type Microsoft.ScriptManager.WebFormsv45.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) +9090876 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +256

(the hosting company provides the following: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272)

I am aware of this question/answer: http://forums.asp.net/t/1823969.aspx/1 But I find it wasn't very helpful since it doesn't provide any details about where I would correct the references (I am not sure where/what csproj is).

Also I am aware of the similar question posted here with no answers:

Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'

Any tips and suggestions how to fix this issue are appreciated.

Thank you!

Upvotes: 2

Views: 10450

Answers (1)

Reed Copsey
Reed Copsey

Reputation: 564403

The LoadSuccessExpression property is a new property in .NET 4.5. Since your host only supports .NET 4, this property does not exist when deployed.

You're getting a missing method exception since a property setter is really just a method behind the scenes.

Upvotes: 4

Related Questions