Using the msbuild task in your solution file, you need to collect all the projects in this solution, including MVC projects. Here is a sample from my own build script:
<target name="msbuild_solution">
<msbuild project="build.sln" verbosity="minimal">
<property name="Configuration" value="Release" />
<arg value="/t:Build" />
<arg value="/nologo" />
<arg value="/noconsolelogger" />
<arg value="/m:2" />
<arg value="/tv:3.5" />
</msbuild>
</target>
source
share