2
votes

I created a brand new ASP.NET MVC 3 project and ran it without making any changes to observe the project template behavior, and I get a "Method not found error" -- the full stack trace is below.

When I view the WebPageContext object in object browser, I see that there is indeed no method signature which matches the called for constructor. The System.Web.WebPages reference resolves to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\System.Web.WebPages.dll.

I tried to reinstall ASP.NET MVC 3 RTM as well as VS 2010 SP1 but with no luck. Please help.


ERROR MESSAGE:


Method not found: 'Void System.Web.WebPages.WebPageContext..ctor(System.Web.HttpContextBase, System.Object, System.Collections.Generic.IDictionary`2)'.

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.WebPages.WebPageContext..ctor(System.Web.HttpContextBase, System.Object, System.Collections.Generic.IDictionary`2)'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[MissingMethodException: Method not found: 'Void System.Web.WebPages.WebPageContext..ctor(System.Web.HttpContextBase, System.Object, System.Collections.Generic.IDictionary2<System.Object,System.Object>)'.] System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +0
System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +37 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +21 System.Web.Mvc.Async.<>c__DisplayClass8
1.b__7(IAsyncResult ) +12 System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62 System.Web.Mvc.<>c_DisplayClasse.b_d() +50 System.Web.Mvc.SecurityUtil.b_0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8862669 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.431

2

2 Answers

2
votes

The problem was due to Visual Studio Async CTP being installed. Apparently SP1 doesn't like the Async CTP.

I uninstalled Visual Studio 2010 Beta1 as well as ASP.NET MVC 3 as well as the Visual Studio Async CTP then reinstalled Visual Studio 2010 SP1 and everything now works.

It took way too much time, shame that this problem took the entire day to fix, Microsoft really should get their act together.

0
votes

You mentioned trying to reinstall MVC 3 RC. Note that the RC is no longer supported. Please install the RTM version and try again. This should resolve your issue.