Monday, March 30, 2020

Migrate packages.config to the PackageReference format in migrating a project from .NET Framework to .NET Core.

This is the fourth of four preparatory steps listed here, with the first three being:

  1. Upgrade to version 4.7.2 of the Framework.
  2. Use the .NET Portability Analyzer.
  3. Use the .NET API Analyzer to find out where the errors what will throw an PlatformNotSupportedException are.

After these steps one actually ports the code. Per this (part way down), right-click on the References in a Visual Studio Framework project and pick "Migrate packages.config to PackageReference..." to make the magic happen. The little wizard you walk through makes a distinction between direct "Top-level" dependencies and lower, so to speak, "Transitive" dependencies.

 
 

Addendum 3/31/2020: It is probably best to right-click on packages.config instead of References.

No comments:

Post a Comment