This project is read-only.

Uing the DependentUpon Flag prevents T4MVC from seeing cshtml files.

Jun 5, 2013 at 6:56 PM
This is a very minor quibble, but I thought I would point it out.

I like using the DependentUpon flag in my project to sometimes group files in Solution Explorer instead of using subfolders. For example, I have a master _Layout.cshtml, but I have sub templates under it like _Layout.Public.cshtml & _Layout.Article.cshtml. If I use the DependentUpon flag in the project file to visually place them under the _Layout.cshtml file in the Solution Explorer then T4MVC no longer sees them and my references to them break.

If I use this in the project file:
<Content Include="Views\Shared\_Layout.Public.cshtml/>
Then T4MVC sees the file and I can do this:
this.Layout = MVC.Shared.Views._Layout_Public;
However, If I add this grouping to the project file:
<Content Include="Views\Shared\_Layout.Public.cshtml>
Then the following line breaks because T4MVC no longer sees the file.
this.Layout = MVC.Shared.Views._Layout_Public;
Jun 6, 2013 at 1:57 AM
I think at least for Views, we have logic that processes though dependent files, but I forget how that works. You might need to dig into the t4 code :)