views:

35

answers:

2

I am using .NET Framework and C# and working on a large project. The application compile takes forever. Currently, I don't have time to see what is going wrong. But is there anyway that if I change 2-3 files I can compile the application quickly.

It is a web application. The solution has 6-7 other projects.

+1  A: 

I believe you "must" rebuild(what ever that got changed) in order for your changes to take effect.

Also, as a side note:

  • Break into modules/assemblies, compile only that assembly which got changed!
  • If your existing change is in some specific assembly then build only that assembly.
KMan
Even if I build only the assembly that got changed it takes forever since it has references to other assemblies.
john doe
This is not working! I uncomment some code and now I need to compile again. I am compiling a single project and it is taking 5 minutes!
john doe
@JohnDoe: Use `Build` and donot use 'Rebuild`; if the references of the project has not changed, the compiler will not *recompile* them; *rebuild=clean + build*. http://stackoverflow.com/questions/1247457/difference-between-rebuild-and-clean-build-in-visual-studio-2008
KMan
Thanks! Actually I am using msbuild.exe command line for building and it is working much much faster.
john doe
A: 

"unload" the projects (right click on the project in the solution explorer). The project isn't removed from your solution, but it won't be compiled either.

Matt Jacobsen
If the project the unloaded can the main project still refer to the dlls of that project.
john doe