Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to do a 'project only' build or rebuild for a C# project

In Visual Studio 2005, you can right-click on a C++ project and choose Project Only > Build Only [project].

Is there any way of doing the same for a C# project? If I choose Build from the project right-click menu, it builds all the dependencies too.

like image 781
Ant Avatar asked Jul 13 '09 16:07

Ant


People also ask

What is the difference between build Solution and rebuild solution?

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.

Is rebuild the same as clean and 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).

What is the difference between build and rebuild?

Taken from this link: Build means compile and link only the source files that have changed since the last build, while Rebuild means compile and link all source files regardless of whether they changed or not. Build is the normal thing to do and is faster.


1 Answers

Not necessarily - if the dependencies have not changed then they will not be rebuilt. If you select "ReBuild" then Visual Studio will rebuild the dependencies as well but you will find that a normal build will reuse the existing dependency assemblies if the source code for those assemblies is unchanged.

C# uses an assembly's metadata to build against. This metadata is a part of the assembly itself and as such the entire assembly must be present at compilation time for the compiler to resolve any external types and their members.

like image 76
Andrew Hare Avatar answered Oct 02 '22 04:10

Andrew Hare