Home > database >  Select desired target .NET version in .NET Upgrade Assistant
Select desired target .NET version in .NET Upgrade Assistant

Time:12-19

My intention is to upgrade my .NET Framework 4.8 projects to .NET 6. Using .NET 6 is important because that is the highest .NET version one of my dependencies supports. I ran the upgrade assistant analyzer on my project and received the following line.

Recommending Windows TFM net7.0-windows because the project either has Windows-specific dependencies or builds to a WinExe

Is there any way to set the target version to .NET 6 in the .NET Upgrade Assistant?

CodePudding user response:

You cannot directly set the specific version, but you can decide whether to use LTS (Long term service release), Current (well, the current realease) or Preview (the next, upcoming version).

You use the --target-tfm-support command line option with either one of these values.

At the time of this writing the situation should be as follows:

  • LTS: net-6.0
  • Current: net-7.0
  • Preview: net-8.0 (or some minor version of net-7.0)

Obviously, this will change over time.

More information and details can be found here.

  • Related