I am working on a Visual Studio MVC-4 project. It takes approximately 2 minutes to build the solution, which makes no sense. It is a small solution with 5 projects, with few
One possible reason that your compile time is so long is that you have have <MvcBuildViews>
set to true, which will compile your views and alert you to any syntax errors in your view. Because you can have a large number of views, this process can lengthen your build time significantly (minutes vs seconds). Here is a link to a site which will explain how to turn off/on the MvcBuildViews attribute. In case the site goes down, you basically add the following line to your solution file:
To Enable
<MvcBuildViews>true</MvcBuildViews>
To Disable
<MvcBuildViews>false</MvcBuildViews>
However (opinionated diatribe coming) I disagree with him on when you should use this feature. He states you should have this attribute enabled only for Release/Production while I think that you should only have it enabled for Debug configurations. Most developers will fully test their web apps in Debug and then and only then switch to Release and push. Why would one not want to have a compile time check in Debug mode when that is what you are doing...debugging and checking for errors/bugs?
Turn on verbose building. Go to Tools -> Options -> Projects and Solutions -> Build and Run Set MS Build verbosity to Diagnostic. You should see what is taking time.