views:

65

answers:

2

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:

alt text

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

Screenshot of the error message:

alt text

Any thoughts?

A: 

Make sure that the System.Web.Mvc assembly points to the correct version:

C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll

and that System.Web.Helpers also:

C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\System.Web.Helpers.dll

In Beta 3, System.Web.Helpers is a separate download so make sure you've installed AspNetWebPages.msi.

Darin Dimitrov
Thank you, but my System.Web.Mvc points to `c:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll` and System.Web.Helpers point to `C:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\Assemblies\System.Web.Helpers.dll`. So it looks fine too me, but i'll try to reinstall the `AspNetWebPages.msi` package.
Martin
+3  A: 

After intense searching I found some answers here: http://www.asp.net/learn/whitepapers/mvc3-release-notes

Stupid me should have read the 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.

Martin
@Martin, Thanks for the link. I had the exact same problem. I resolved it at the time by creating a new project and simply importing all my source code into it.
Preets