Is there any way to configure visual studio to compile views when compiling for release mode only. It seems that its all or nothing and for my project which has lots of different views it just bogs down to where I turn it off but forget to turn it on during pushes to QA.
Asked
Active
Viewed 2,321 times
5
2 Answers
11
You could wrap it in a <PropertyGroup>
Example
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<MvcBuildViews>true</MvcBuildViews>
</PropertyGroup>

Colin Bacon
- 15,436
- 7
- 52
- 72
-1
Are you specifically setting something to compile the views like the Razor Generator? (http://razorgenerator.codeplex.com/) If not views in MVC are not compiled.

AntSpiteri
- 312
- 1
- 9
-
I use it to check sever side code embedded in views and all required imports are in place. Finding out that I gaffed something at runtime just blows. – MikeJ Jun 22 '13 at 00:12