AndrewVA
AndrewVA

Reputation: 155

Force usage of packages.config in VisualStudio 2019

Visual Studio doesn't see all installed packages in packages.config files.

So restore command not working.

I have no idea why. Need a bit of assistance.

enter image description here

Upvotes: 0

Views: 2389

Answers (1)

Mr Qian
Mr Qian

Reputation: 23770

Visual Studio doesn't see all installed packages in packages.config files. So restore command not working.I have no idea why. Need a bit of assistance.

In fact, when you use packages.config to install nuget packages, all of packages and their dependencies are stored in the packages.config file.

I guess that you might drop some dependencies of the nuget packages in the packages.config file or xxxx.csproj. In this situation, Restore nuget packages will not restore the dependencies of the nuget packages.

The only solution is to reinstall nuget packages:

Please click Tools-->Nuget Package Manager--> Package Manager Console-->input update-Package -reinstall

enter image description here

And after that, you will see all of them in the packages.config file.

Upvotes: 1

Related Questions