Asp.NET MVC 2 Preview 2: aspx namespace issue in scope

Now I am testing a new MVC 2 Preview 2 feature called Areas in a single project. Following MSDN , as well as with the relases notes document, I created the Areas folder, then a folder with the name of the area, then the Controllers and Views folders inside that. Of course, a route class has been added and it works.

Then I moved one of the controllers and looked at the folder in this new area. And it is not possible to start the aspx page in the first line:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
    Inherits="System.Web.Mvc.ViewPage<OtherReferencedProjectNamespace.Entity>" %>

with parser message

"Cannot load the type: OtherReferencedProjectNamespace.Entity" /example entity name here/

There seems to be no reference to namespaces used previously without any problems! Does the code moved to the scope have separate namespace references?

There were no changes in the project, just moved one of the controllers with it, viewing the files in the area.

I have no explanation yet, do you have an idea?

+5
source share
1 answer

OK - found! Had to copy the Web.config file from the views directory to the Views folder.

+1
source

All Articles