Invalid child element MvcBuildViews
I have an ASP.NET MVC 2 Beta app and have set <MvcBuildViews>true</MvcBuildViews>
in the property group at the top of my csproj file. But my views are not being compiled. A closer look at the .csproj file shows a squiggly under the MvcBuildViews tag and when I hover over it, it says
The element 'PropertyGroup' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003' has invalid child element 'MvcBuildViews' in namespace 'http://schemas.microsoft.com/developer/msbuild/2003'. List of possible elements expected: 'Property' in namespace 'http://schemas.microsoft.com/developer/msbui开发者_运维百科ld/2003'.
What am I doing wrong?
Many elements you define in the .config are not part of that schema, but still operate. It's the same way for MSBuild scripts.
That's a custom property we include in the project files to compile views. It shouldn't cause any problems, since you can define your own properties (see http://msdn.microsoft.com/en-us/library/t4w159bs.aspx) in your project file.
For further detail, please refer to:
http://forums.asp.net/t/1506782.aspx?Error+invalid+child+element+MvcBuildViews+in+namespace
btw, this issue existed in 2009, but now is 2015, it still exists.
精彩评论