Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2008 Unnecessary Project Building

I have a C# project which includes one exe and 11 library files. The exe references all the libraries, and lib1 may reference lib2, lib3, lib4, etc.

If I make a change to a class in lib1 and built the solution, I assumed that only lib1 and the exe would need to be changed. However, all dll's and the exe are being built if I want to run the solution.

Is there a way that I can stop the dependencies from being built if they have not been changed?

like image 704
Brad Leach Avatar asked Feb 20 '09 01:02

Brad Leach


People also ask

How do I stop a project from building in Visual Studio?

You can hit Ctrl + Break on the keyboard to cancel/stop a build that is currently in progress.

How do you exclude a project from a building?

On the menu bar, choose Build > Configuration Manager. In the Project contexts table, locate the project you want to exclude from the build. In the Build column for the project, clear the check box. Choose the Close button, and then rebuild the solution.

How do I clean up my Visual Studio project?

To build, rebuild, or clean an entire solutionChoose Build All to compile the files and components within the project that have changed since the most recent build. Choose Rebuild All to "clean" the solution and then builds all project files and components. Choose Clean All to delete any intermediate and output files.


1 Answers

Is the key this phrase? "However, all dll's and the exe are being built if I want to run the solution"

Visual Studio will always try to build everything when you run a single project, even if that project doesn't depend on everything. This choice can be changed, however. Go to Tools|Options|Projects and Solutions|Build and Run and check the box "Only build startup projects and dependencies on Run". Then when you hit F5, VS will only build your startup project and the DLLs it depends on.

like image 58
Sebastian Good Avatar answered Oct 10 '22 06:10

Sebastian Good