mveith
mveith

Reputation: 477

Exists any way (or advice) to speed-up c#/WPF projects build?

I have the application (solution in VS2010) with +-10 projects. Some of these projects are quite large (dozens of folders and hundreds of files).

When I make a change in project on lower level and I want to run my tests (+-10 seconds) then I have to wait 2 minutes for projects build. This is very inefficient.

Is there any way to speed-up build? For example, split current projects into multiple projects or something else?

Or are there some general advice and recommendations to speed-up building projects in Visual Studio?

Upvotes: 4

Views: 1504

Answers (3)

Jacob
Jacob

Reputation: 759

Try this: Go to "Tools" menu -> "Options" -> "Projects And Solutions" -> "Build And Run" And increase the value of "Maximum number of parallel project builds" to 32 or greater.

Upvotes: 3

Rafal
Rafal

Reputation: 12629

In my experience solutions with large number of projects build slowly on vs2010 and there is not much you can do about it:

  1. Reduce number of projects - larger single project will build faster then many smaller.
  2. Prepare set of build configurations Build->ConfigruationManager to build only parts of your project since you don't have to build projects that depend on changed project if public interface is not changed. This can be tricky to use and some unexpected errors might occur in runtime. Also make sure that all your projects point to single Bin\Debug Bin\Release folder so that new dlls are loaded on application start. This is requited because if you don't build project its dependencies wont be copied to its output directory.
  3. Upgrade to vs 2012. This is the best option you can choose.

Upvotes: 1

nikita
nikita

Reputation: 2817

Try to use tools that allow concurrent test execution coupled with shadow building - NCrunch or MightyMoose. Also try to get rid of unused references - for example move all tests that test only your core project to separate project so that they get executed right after core is built. Try not to use MS accessors, because they force to fully recompile all projects that they are referencing. And of course use SSD disks.

Upvotes: 1

Related Questions