I have always used the Visual Studio Dependencies option to ensure that, for example, when building my C++ projects, any dependent LIB or DLL projects are also built. However, I keep hearing people mention 'references' and wondered, with VS 2010 on the horizon, I should be changing how I do this.
Are there any benefits to using references to dependencies or is the former a .NET feature only? I am currently using VS2008.
They are basically no different, they are used to store and manage references. Just as Lex said, the Dependencies is a better way to represent different types of references, we can clearly know where the reference comes from, SDK, nuget, etc. so that we can manage our references more efficiently.
Restart Visual Studio and open your app. Right-click on the References or Dependencies node in the project that caused the error and choose Add Reference.
A project reference is a link from the current Studio project to another project. The reference makes certain resources in the referenced project become available for use in the current project.
I prefer using references since these were introduced for unmanaged C++ in VS 2005. The difference (in unmanaged C++ developer's perspective) is that reference is stored in .vcproj file, while project dependencies are stored in .sln file.
This difference means that when you reuse your project in different solutions (and I often do) you don't need to redefine the inter-project relationships again.
Visual Studio is smart enough not to depend gravely on the paths of the projects when it establishes the reference relationship.
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