Phenman
Phenman

Reputation: 59

VS2017 NuGet: Dependencies not install automatically

I have a problem with Visual Studio 2017. When I install any package, nuget manager not installs dependencies. For example, Microsoft.EntityFrameworkCore.Sqlite has 2 dependencies and I must install it manually.

Is it normal behavior? As I remember in the past nuget manager did dependencies installation automatically.

Upvotes: 3

Views: 4708

Answers (2)

Unbalanced-Tree
Unbalanced-Tree

Reputation: 58

I was facing the same issue with the community version. It was resolved by switching from the Community to the Professional. For both the 2019 and 2022 versions.

Upvotes: 0

Leo Liu
Leo Liu

Reputation: 76770

VS2017 NuGet: Dependencies not install automatically

Your package should be managed as packagereference. You could edit your project file .csproj to check it.

Unlike packages.config, PackageReference lists only those NuGet packages you directly installed in the project. As a result, the NuGet Package Manager UI and the project file aren't cluttered with down-level dependencies.

Besides, the dependencies info included in the project.assets.json in the obj folder. You do not need to install the dependencies manually.

You can check the document Migrate from packages.config to PackageReference for some details.

Hope this helps.

Upvotes: 1

Related Questions