Is there any way to tell visual studio to not include a project when building the solution without just removing the project from the solution?
The situation I have is that one project in a solution requires a plugin/tool/library that I don't have installed, but another developer on our team does. So when I try to build the solution, I get compilation errors. It's a unit testing project, so removing it from compilation wouldn't affect the function of the application.
I don't want to remove the project from the solution, because he would then just need to re-add it after I check in the solution (and then I would need to remove it when I check it out, ad infinitum).
To temporarily remove a project from the active solution configuration. On the menu bar, choose Build > Configuration Manager. In the Project contexts table, locate the project you want to exclude from the build.
For a multi-project solution, "rebuild solution" does a "clean" followed by a "build" for each project (possibly in parallel). Whereas a "clean solution" followed by a "build solution" first cleans all projects (possibly in parallel) and then builds all projects (possibly in parallel).
Build Solution - compiles code files (dll and exe) that have changed. Rebuild Solution - Deletes all compiled files and Compiles them again regardless of whether or not the code has changed.
Choose Clean Solution to delete any intermediate and output files. With only the project and component files left, new instances of the intermediate and output files can then be built.
Go to the "Build" dropdown, choose "Configuration Manager", and you can select which configuration you want to update. Then in the list of project below, deselect the "Build" checkmark on the project you want to exclude from the build.
A quick fix is to unload the project. This is a local setting so it won't change the solution or the project.
Right Click on Solution>Configuration Manager...
Here you can see a grid with a Build column with checkboxes, just uncheck the project you don't want to be build.
if you unload the project, then other projects that have any reference to the project that you unload, will throw build error during compilation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With