views:

160

answers:

2

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.

+2  A: 

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.

Andrew Hare
Shame. My C++ dependencies still want to build themselves, even though they haven't changed - as you said, the C# ones seem not to.
Ant
+2  A: 

No. It's not possible.

In C++, for dependencies, you only need headers. On C# you need the assemblies, then if they need to be rebuild, they will.

FerranB