VS 2022 - cannot change Target Platform to .Net 6.0 for a project created in VS 2019
Asked Answered
R

1

7

Just installed VS 2022 on a machine, after I removed VS 2019 (VM with limited space). VS 2022 installed fine. I can create a .Net 6.0 project and compile it - no problem. I can open the project I created in VS 2019 - and compile it - no problem.

But - when I try to change the Target Platform from .Net 4.6 to 6.0 - I do not see anything above .Net 4.8 in the drop down list.
enter image description here

This is VS 2022 - and I CAN create a new .Net 6.0 project and compile it. enter image description here

And when I go into that New Project's Properties - I can see .Net 6.0 in the dropdown... enter image description here

So - I think I am missing a step to get my older 2019 project - fully upgraded to 2022. I loaded the project in 2022 - but when I look at the properties for that project, the screen looks like it did in 2019 --- but for a new project the properties screen looks VERY different (as you can see in the two screen shots attached).

Does anyone have any thoughts as to what steps I might be missing? I loaded .Net 6.0 SDK on this machine (hence why I can create a .net 6.0 project and compile it :)
Are there other steps to making an older project work like it was created in VS 2022 - and then make it use .Net 6.0 ???

Any thoughts would be much appreciated!!

Renz answered 13/11, 2021 at 7:49 Comment(3)
Wrong kind of project, this one has the old format and can only target the legacy .NET Framework. Look at the .csproj files with, say, Notepad to see the difference.Viradis
Is it a new project you are trying to change? Or a a previous project made using .net framework? .net (is a newer version for .net core) and it is different with .net framework.Rote
Ok - I see my issue. I had been confusing .Net 6.0 - which is Core based, with Framework 4.8. The application I wrote in 2019 is a WinForms app - based on Framework (orig 4.6 and now 4.8). I see now that I would have to create a new .Net 6.0 project and look at porting everything over to the new project from the older one if that is something I wanted to do.Renz
U
7

There is no direct upgrade from .NET Framework (any version) (but there is a tool for some types of projects) to anything .NET Core. And .NET 5–8 are based on Core.

Additionally, VS2019 does not support .NET 5–8. You need VS2022 for those.

Unreadable answered 13/11, 2021 at 13:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.