❔ Upgrading a solution from .net core 3.1 to .net 6.0
Hi guys, I am upgrading a old solution from .net core 3.1 to 6.0 and I am facing some issues, not sure if I am going about it in the right way.
I have changed the TargetFramework in the projects of the solution to
<TargetFramework>netcoreapp6.0</TargetFramework>
and
<TargetFramework>netstandard6.0</TargetFramework>
I have about 21 errors right now in the solution similar to this:
Error NU1201 Project projectName is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Project projectName supports: netstandard6.0 (.NETStandard,Version=v6.0) projectName D:\dev\projectName.FunctionalTest.csproj
Best Regards
4 Replies
https://learn.microsoft.com/en-us/dotnet/standard/frameworks
maybe try with
<TargetFramework>net6.0</TargetFramework>
Target frameworks in SDK-style projects - .NET
Learn about target frameworks for .NET apps and libraries.
Ok, thank you that solved about half the issues
We still have a couple errors like this:
Project '..projectname.csproj' targets 'netstandard6.0'. It cannot be referenced by a project that targets '.NETCoreApp,Version=v6.0'. projectname C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 1805
But I think they are related to temp files, I just deleted obj and bin folders to allow vs to re create them again on build. I am however facing issues when I am trying to rebuild the solution, this windows pops up instead
But I think they are related to temp files, I just deleted obj and bin folders to allow vs to re create them again on build. I am however facing issues when I am trying to rebuild the solution, this windows pops up instead
Closing down the solution and opening togheter with some cleanup solved the issue, thanks.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.