I have just upgraded my ASP MVC 3 application from the preview to the beta version. In preview everything worked fine, but as soon as I upgraded weird things started to happen.
I get this error message:
Compiler Error Message: CS0234: The type or namespace name 'Helpers' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\1512250b\962d050c\App_Web_index.cshtml.a8d08dba.kncxiw31.0.cs Line: 19
I have tried to completly rebuild the application, and to clear the temporary asp.net files, but nothing works. My solution builds successfully, no errors while building. But when i try to open the website, I get this error.
These are my referenced dll's:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Screenshot of the error message:
Any thoughts?
If you are an expert at ASP.NET MVC, you need not to spend time on some other complex frameworks but ASP.NET WEBAPI is the best one for you. It works on the same lines as MVC – though it doesn't have System. Web dependency.
ASP.NET MVC is no longer in active development.
Yes, it is very much possible for MVC pages to coexist with asp.net web forms. I implemented that in my existing asp.net application for adding new features. We need to make sure of referring the MVC DLLs, registering routing tables for URL routing and configuring the assemblies and namespaces in Web. config file.
After intense searching I found some answers in the ASP.NET MVC 3 release notes. There is a section called Upgrading an ASP.NET MVC 2 Project to ASP.NET MVC 3 which tell you what to do:
Add the two following lines into your <assemblies>
section in your web.config
:
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With