Reputation: 3193
Upgrading VS 16.7 to 16.8 made .NET 5 unavailable...
( worked in previous 16.8.0 preview 3)
.net 5 is installed...
but when creating a new project in Visual Studio
is not appearing in the target frameworks list...
dotnet --info
states .net 5.0 it is installed:
and
csc -langversion:?
reveals C# 9.0 is the default language
Upvotes: 2
Views: 8081
Reputation: 421
I upgraded my version of Visual studio from 16.7.x to 16.8.1. I expected NET 5 to be listed as a target framework, but it was not.
I had previously created projects in 16.8 preview 6 using RC1.
Visual Studio Install did not list .NET 5 as an individual component either. I then downloaded and installed the x64 SDK. Still no luck. .NET5 was still missing as a target framework for VS 16.8.x
Today I opened VS Installer and from the More dropdown menu selected Repair . The repair process took 25-30 minutes to run, but now .NET Core 3.1 and .NET 5 are listed in all the usual places. Norm
Upvotes: 3
Reputation: 3193
Ok PPL... chill out!!! problem solved!
Just now (2020.11.12 21.50h UTC)
VisualStudio notified me of an available update: Version 16.8.1...
(yes,,, 1 day was the lifetime of previous version 16.8.0 ;-))
After install .net 5.0 now appears correctly as a target platform...
Just some more of the usual MS annoyances...
It's solved! Thanks to everybody who tried to help!!!
Upvotes: -3
Reputation: 11
I have also updated to 16.8.0, but when I create WinForm or WPF it automatically Targets 3.1 and I have to manually update it to 5.0.
I found that in Options->Environment->Preview Features if I tick "Use previews of the .NET Code SDK" when I create a project it does give me the option of the Target Platform.
The .NET 5.0 option is listed but says ".NET 5.0 (Preview)" even though it should be the GA release.
It seems like Visual Studio thinks .NET 5.0 is in preview and not offering it as an option unless the above is ticked.
By the way I have never installed any previews on this machine.
Upvotes: 1