Hi. Created a MVC 3 basic application and through NuGet packages manager I updated Microsoft ASP.NET Web Pages 2. When run my application on debug, I receive this error:
System.MissingMethodException: Impossibile trovare il metodo 'System.Collections.Generic.Dictionary`2<System.String,BlockParser>
System.Web.Razor.Parser.CSharpCodeParser.get_RazorKeywords()'.
On my root web.config file, I modified this line from version 1.0 to version 2.0 like this:
So, I think the best solution is to develop directly this website with MVC 4, but my web provider does not support it. Thank you for you support and my best regards.
Please, "Mark As Resolved" if my reply was helpful to you
--
Blog
Note This topic assumes that you are using WebMatrix to work with your ASP.NET Web Pages 2 code. However, as with Web Pages 1, you can also create Web Pages 2 websites using Visual Studio, which gives you enhanced IntelliSense capabilities
and debugging. To work with Web Pages in Visual Studio, you must first install Visual Studio 2010 SP1, Visual Web Developer Express 2010 SP1, or Visual Studio 11 Beta. Then install the ASP.NET MVC 4 Beta, which includes templates and tools for creating ASP.NET
MVC 4 and Web Pages 2 applications in Visual Studio.
Hope this helpful
Regards
Please mark the replies as answers if they help or unmark if not.
Feedback to us
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
andri745
Member
163 Points
73 Posts
MVC 3 and System.Web.WebPages version errors
Dec 08, 2012 10:17 AM|LINK
Hi. Created a MVC 3 basic application and through NuGet packages manager I updated Microsoft ASP.NET Web Pages 2. When run my application on debug, I receive this error:
System.MissingMethodException: Impossibile trovare il metodo 'System.Collections.Generic.Dictionary`2<System.String,BlockParser> System.Web.Razor.Parser.CSharpCodeParser.get_RazorKeywords()'.
On my root web.config file, I modified this line from version 1.0 to version 2.0 like this:
Then I found these tags on the same file:
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime>How can I solve this error?
--
Blog
Microsoft MCPD - Web Developer .NET 4
CPrakash82
All-Star
18290 Points
2844 Posts
Re: MVC 3 and System.Web.WebPages version errors
Dec 08, 2012 01:16 PM|LINK
In order to use WebPages Version 2 you need to have MVC 4 installed. @Imran has a blog describing the trick, you can follow here.
http://weblogs.asp.net/imranbaloch/archive/2012/04/28/using-razor-v2-in-asp-net-mvc-3.aspx
I am not sure, if you need version 2, if not then shift back to version 1 and it should be resolved.
andri745
Member
163 Points
73 Posts
Re: MVC 3 and System.Web.WebPages version errors
Dec 08, 2012 01:49 PM|LINK
So, I think the best solution is to develop directly this website with MVC 4, but my web provider does not support it. Thank you for you support and my best regards.
--
Blog
Microsoft MCPD - Web Developer .NET 4
Young Yang -...
All-Star
21343 Points
1818 Posts
Microsoft
Re: MVC 3 and System.Web.WebPages version errors
Dec 14, 2012 11:35 AM|LINK
If you want to use WebPage 2, you must have MVC 4, look this artile: http://www.asp.net/web-pages/overview/whats-new/top-features-in-web-pages-2
Hope this helpful
Regards
Feedback to us
Develop and promote your apps in Windows Store
andri745
Member
163 Points
73 Posts
Re: MVC 3 and System.Web.WebPages version errors
Dec 14, 2012 02:58 PM|LINK
Thank you very much for your infos. I'm using VS 2012, but in my project I'm using MVC 3. Nuget suggested me to update WebPages to version 2.
--
Blog
Microsoft MCPD - Web Developer .NET 4
imran_ku07
All-Star
45815 Points
7698 Posts
MVP
Re: MVC 3 and System.Web.WebPages version errors
Dec 20, 2012 04:19 AM|LINK
Bin Deploy is always available.
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD