Have you migrated to nuget PackageReferences?

JohnH

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
1,678
Location
Norway
Programming Experience
10+
Are you using old packages.config or have you migrated to PackageReferences? If your don't know have a look here: Migrate to PackageReference with 3 clicks | The NuGet Blog

I know this is rather old news now, but I just discovered this option and have migrated. There were some minor issues, a couple of dependencies were detected as toplevel - I just removed the packages and migrated then added the actual toplevel afterwards . While I could promote a package to toplevel the migration tool didn't offer option to demote incorrect ones. There was also a package that had problems with a dependency version, where I had to install latest version of the dependency as toplevel - this may have been an issue with package itself.

It cleaned up some disk space here, I now have half a GB in the common .nuget folder, these were duplicated across several packages folders in solutions before, I also used to backup all these extra copies. While going through my "active" projects I also discovered several were using direct references to old library versions, which I upgraded to nuget. Nuget makes keeping up to date more comfortable.

With the benefits I wonder why default package management format in VS 2019 is not set to this? Or even with option to ask each new project. Is it because of incompabilities with some packages? I guess this will be default in next VS.
 
On a clean machine install of VS, I got prompted if I wanted Package References or the old packages.config. I didn't get prompted later succeeding projects.
 
Last edited:
Perhaps they added that in a later revision, I'm sure I haven't seen that question when I installed VS 2019 or any update.
 
Back
Top Bottom