views:

578

answers:

1

Hi I am now testing the new feature of MVC 2 Preview 2 called Areas within one project. Followed the MSDN article as well as the relase notes document I have created the Areas folder, then area's name folder, then Controllers and Views folders within that. Of course the route class was added and it works.

Then I have moved one of the controllers and it's view folder to that new area. And it fails to run aspx page on the first line:

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

with the syntax parser message

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

Looks like there are no references to namespaces used previously without any problems! Does the code moved into an area have separate namespace references?

No reference changes were made to the project, just moved one of the controllers with it's view files into an area.

I have no explanation for that yet, have you got an idea?

A: 

OK - found it! Had to copy Web.config from root Views directory to the area Views folder.

twk