This is a bit of an odd one. I have updated VS2022 to 17.9.3 and installed both .Net Core 7 and 8 SDK. I can create new projects /w .Net 7.0 and 8.0 as the target framework, and I was able to update projects in a test solution (.Net 6.0) to .Net 8.0. However, I have a main project (.Net 6.0) solution and when I open any of those projects and go to the target framework, it only lists up to .Net 6.0. I have looked at both the .csproj and .sln file contents to see if there might be any difference that might explain why VS refuses to show the newer .Net versions.
If I edit one of the projects in Notepad and set its target to .Net8.0, when I open that project's properties in VS, the target framework dropdown is empty. (.net 8.0 still does not show as an option)
Has anyone come across this behavior with Visual Studio and updating existing solutions? It is strange that one smaller solution worked fine while the other refuses to list the available .Net SDKs. The solution that does not work has a mix of class libraries and ASp.Net MVC console projects. None of the projects offer .Net 7 / 8 as options.
Ah, just found the answer after looking deeper at migrating ASP.Net Core applications. The solution had a global.json configuration file that had:
{
"sdk": {
"version": "6.0.100",
"rollForward": "latestMinor"
}
}
... which restricted the .NET SDK versions available across the entire solution to .NET 6. I updated that version to "8.0.000" and all .NET SDK versions are now appearing.
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