I tried upgrading a .NET standard project to a .NET 6 or 8 project using this upgrade assistant tool:
https://dotnet.microsoft.com/en-us/platform/upgrade-assistant/tutorial/install-upgrade-assistant
I ran the tool as the steps describe (installing it, using upgrade-assistant analyze with the project csproj path and then upgrade-assistant upgrade with the path), but after it was done, the project still remains with a target framework of .net standard 2.0.
Is there something else needs to be done in order to upgrade the framework?
I eventually simply edited the project file directly. To convert it to .net 6 or 8 all you need to do is change the <TargetFramework>
to be like this:
<TargetFramework>net6.0</TargetFramework>
or like this:
<TargetFramework>net8.0</TargetFramework>
It's a 3 seconds work so no need for any tools
.NET standard works parallelly. That means you would have to update to .NET standard 2.1 if you need it for other old framework projects. Otherwise create new libraries in .NET 6 and migrate your code. According to microsoft: https://dotnet.microsoft.com/en-us/platform/dotnet-standard, .NET 6 supports .NET Standard 2.1. Future versions of .NET will also support .NET Standard 2.1 and earlier versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With