Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between project references and project dependencies?

I have a simple solution in Visual Studio 2010 containing a few static libraries, a few DLLs, and an executable.

Some libraries depend one another (for example the DLL needs two static lib projects to be built before building the DLL itself), and it seems there are two way to achieve this:

1) If I right click on the solution I can select "Project dependencies..." and set the build order

2) I can right click on the DLL project and select Properties->Framework and References and then add a new reference.

What is the difference between #1 and #2? What is the better way to express a build dependency between two projects in Visual Studio 2010?

like image 484
Emiliano Avatar asked Sep 09 '25 20:09

Emiliano


1 Answers

The only difference between a "Project Reference Definition" and a "Project Dependency Definition" is the metadata that defines the output assembly inclusion/exclusion into/from the main project link command.

In Visual Studio 2010-and-going-forward, Microsoft wants you to start using the "Framework and References" dialog, and stop using the "Project Dependencies" dialog (for now, the "Project Dependencies" dialog remains, will probably be removed in the future).

Here's a blog entry that talks about this, and other "Project settings changes with VS2010" by one of the Visual Studio developers:

https://devblogs.microsoft.com/cppblog/project-settings-changes-with-vs2010/

like image 183
charley Avatar answered Sep 12 '25 23:09

charley