Since we upgraded to VS2010 and our lovely shiny new development machines, compiling the build no longer told us of errors in the views. ) :
This was very frustrating as we only found out about these issues when hudson reported a broken build!
Upon further investigation, what seems to have happened is that during the machine upgrade new configurations were added! Running locally we run the newly created “Debug with compiled views x86” wheras before we were just running “Debug with compiled views”.
The Hudson job was still running the old school vanilla flavour of the release config, which still had the setting.
So after a lot of digging (and help from the goregous @plip), I discovered that all I had to do was scroll down and add the <MvcBuildViews>true</MvcBuildViews>
to the new configurations, like so:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug with compiled views|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<MvcBuildViews>true</MvcBuildViews>
</PropertyGroup>
Simples.