This project is read-only.

views not picked up in area

Aug 1, 2013 at 9:50 AM

I have the following folder structure:

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?
Aug 1, 2013 at 11: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 11:20 AM
Edited Aug 1, 2013 at 11: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";
Aug 1, 2013 at 11: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.