Compiling MVC Views

As part of the build process on the apps team at Esendex, we like to be doubly sure nothing is broken by not only compiling, running unit tests, acceptance tests, integration tests AND regression tests, but also checking that all our views compile too.

There’s loads of blog posts on how to do this, quite simply open your MVC csproj file in notepad, and in your the <ProjectGroup> node for the specific configuration you want to compile the builds add:

For example:
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug with compiled views|x86' ">
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>

What did you think?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s