简体   繁体   中英

In Visual Studio, can I prevent certain projects in a solution from being built in parallel?

I have multiple cores on my machine, and I think by default Visual studio will run a build on each of these cores. I am happy to take advantage of parallel builds, but unfortunately there are some build errors that occur in some projects, which to the best of my knowledge are due to certain shared files being accessed at the same time.

Is there a way to specify for these specific projects, that when they are built it is not done in parallel?

(For the record, at least some of the errors are caused by multiple instances of wix light linker having file conflicts.)

This is not supported by MSBuild at the moment.

You can trick MSBuild into doing it, as suggested in a comment by User Joe . For example if you have 1 project that you don't want to be built in parallel, ensure that all other projects either depend on it or are dependencies of it.

I don't know if you can do it for each individual project, but you can tell visual studio how many builds to run simultaneously...

Go to the menus: Tools -> Options -> Projects and Solutions -> Build and Run

In here there will be a text box where you can specify number of parallel project builds.

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