Reputation: 18980
My employer has a solution with 14 projects, and coincidentally, it takes precisely 14 seconds to compile the entire application. This makes it difficult to make changes and re-compile--lots of wasted time. What are things in a .NET application I can look for to make compilation quicker? Or may I ask, what tools are the best to troubleshoot this sort of thing. (To see what's happening with msbuild.exe)
Solution Details:
Please ask if you need more details.
Upvotes: 3
Views: 461
Reputation: 33143
Compilation is sometimes disk bound, especially for .Net applications. It will go faster on a solid state drive. If you want to test this theory, put your code into RAM disk and compile it.
Upvotes: 2
Reputation: 2667
Upvotes: 2
Reputation: 16747
To speed up building, unload the projects you're not working on. In the Solution Explorer, right click a project and click "Unload Project". You can select multiple projects and unload them all at once. When you build, unloaded projects will not be built.
If a solution contains a lot of projects, you're almost certainly only working on a few of them at any given time. If you're working on them all at once, you need to take a look at the way you work.
This is not the same as removing the project from the solution. When you need to change/rebuild an unloaded project, it's easily to simply reload it.
Upvotes: 2
Reputation: 14448
Do you need to rebuild the entire solution every time you make a change? Would rebuilding the current project be enough? that might speed things up a bit.
I work on a solution that has almost 300 separate projects, and takes about 2 minutes to do a full build, but when i am working i only build the project i am currently working on, saves a lot of time.
Upvotes: 3
Reputation: 688
When referencing other VS projects, ensure you have "copy local" set to false unless you require it for a specific reason.
You could create another solution specific to the projects that you are working on.
It's not a long time though!
Upvotes: 2