views not picked up in area

Aug 1, 2013 at 8:50 AM
Hi

I have the following folder structure:

Areas/
Foo/
Controllers
Models
Views
  1.cshtml
  SubViews
      2.cshtml
T4MVC picks up 2.cshtml but not 1.cshtml.
In other words it only picks up views located in subfolders of the view folder for a area.
Is this by design?
What can I do to make T4MVC pick up views located directly in the views folder?
Coordinator
Aug 1, 2013 at 10:12 AM
Can you be more specific when you say it's not 'picked up'? T4MVC generates several different things. What specifically are you trying that's not working? Also, do you get different behavior when not using Areas?
Aug 1, 2013 at 10:20 AM
Edited Aug 1, 2013 at 10:21 AM
Sure. What I mean by not picked up is, it doesn't generate an entry in ViewNames. In the case of 2.chstml it does:

public class ViewNames {
        public readonly string 2= "~/Areas/Foo/Views/SubViews/2.cshtml";
Coordinator
Aug 1, 2013 at 10:40 AM
But if it's outside of any controller folder, where would you expect it to generate this? Generation aside, what code are you wanting to write to refer to it?

And I don't think this behavior is area specific.