Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2017 References vs Dependencies

Tags:

I have a .NET Core solution in visual studio 2017 that is building against the .NET 4.7 framework.

In the main web application there is a dependencies menu that breaks down references into logical categories (Analyzers, Assemblies, NuGet, Projects).

Dependencies Menu

In the helper project it only has a references menu with everything jumbled inside. Is there a way to get the same treatment here as the web application got?

enter image description here

like image 622
Swazimodo Avatar asked Sep 26 '17 17:09

Swazimodo


People also ask

What is the difference between dependencies and references in Visual Studio?

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.

What is Visual Studio references?

A reference is essentially an entry in a project file that contains the information that Visual Studio needs to locate the component or the service.

How do I fix references in Visual Studio?

To fix a broken project reference by correcting the reference path. In Solution Explorer, right-click your project node, and then select Properties. The Project Designer appears. If you're using Visual Basic, select the References page, and then click the Reference Paths button.


1 Answers

It's based on the project file type. The older Full Framework project file gives you the References area, whereas the newer project files give you the Dependencies area. In other words, as long as it's a .NET Framework 4.7 project, there's nothing you can do about it.

That said, you can simply make it a .NET Standard 2.0 project, which does benefit from the new-style project file. Really, all your class libraries should be targeting .NET Standard, anyways, for greater interoperability.

like image 72
Chris Pratt Avatar answered Oct 18 '22 13:10

Chris Pratt