So, I edited the csproj file in an RTM MVC 3 application to set the following property:
<MvcBuildViews>true</MvcBuildViews>
This should result in my views being respected during the build and forced to build a build error if my view is broken. This is the only change I made, however, when I try to create an application, I get the following error:
An error occurred while using a section registered as allowDefinition = 'MachineToApplication' that exceeded the application level. This error can be caused by the fact that the virtual directory is not configured as an application in IIS.
The project compiles and succeeds if I return to false,
Listed below are the build tasks configured in the csproj file (they were never manually edited, they were added by Visual Studio 2010)
<Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> <Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"> <AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" /> </Target>
Am I missing something? How to properly configure MVC 3 / Visual Studio 2010 to check my views during build?
c # asp.net-mvc visual-studio-2010 msbuild
Scott Jan 18 2018-11-18T00: 00Z
source share