简体   繁体   中英

How can I automaticly compile only projects that have changed when I build my solution in VS2010?

I am doing TDD development on a large solution in my company, we use visual studio 2010, I have the problem of long compile time, because it compiles the whole solution each time I do a small change in only one file, It compile very often so slows me down.

Is there a way to tell VS2010 to compile only the project that has changed or some other solution to my problem, we have 20 projects inside the solution, I often touch 2-3 of them when I code.

Thanks.

I am not sure if you can tell VS2010 each and every file to build everytime but I can think of the following as some of the possible solutions,

  1. When you build your solution after making minor modifications and if you don't want the process of building the entire project everytime then you could choose Build option and not Rebuild. Build would check if a project is up-todate and if not only then it will compile.

  2. You could modularize your projects and build them as dlls so you once you have added reference to a dll in your project then you don't have to compile them each and everytime.

The 1st option is built in with vs2010 so you don't have to do much but the 2nd option is the most efficient one. I am not sure if I answered you entirely but let me know if this is not what you exactly were looking for.

Check out NCrunch . NCrunch constantly checks the code as you are typing, and lets you know whether each line of code is covered by at least one test, and whether or not the tests covering it pass. NCrunch does background compiling of just the code that is impacted by your changes, as you make them.

This is done without your need to stop and manually compile (or even save!) your code. Just write the test code, and then write your production code and you will instantaneously or nearly so (depending, of course, on the speed and isolation of your tests) how you're doing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM