nuget

package reference

By default .NET framework uses packages.config. You can change this default in VS2017 or later by going to Tools > Options > NuGet Package Manager > General > Default package management format.

This default is used only when adding the first nuget package to a project. For existing projects that already have packages.config, right-click the packages.config file and click Migrate packages.config to PackageReference. This one-off migration will convert the project to use the newer format.