2

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:

  • Microsoft.NETCore.App 5.0.0 [c:\Program Files\dotnet\shared\Microsoft.NETCore.App]

and

csc -langversion:?

reveals C# 9.0 is the default language

  • Installing de SDK separatly did not solve the problem.
ZEE
  • 2,931
  • 5
  • 35
  • 47
  • 1
    Does this answer your question? [.net 5 is not available in Visual Studio 2019](https://stackoverflow.com/questions/60843091/net-5-is-not-available-in-visual-studio-2019) – kosist Nov 12 '20 at 17:58
  • 2
    .NET 5 doesn't need a preview version since Visual Studio 16.8 shipped on 10th November. – Martin Costello Nov 12 '20 at 18:04
  • no @kosist... i already had come over that post... did not solve anything... – ZEE Nov 12 '20 at 18:17
  • yep @MartinCostello... that is the version I installed... but the problem persists... and like you can read in the question.. with preview 3 to 6 just worked fine... – ZEE Nov 12 '20 at 18:19
  • @ZEE, just to be sure - did you select checkbox Tools -> Options that enables preview versions of the .NET Core SDK? – kosist Nov 12 '20 at 19:48
  • yes @kosist... but that should not be necessary since the today's version 16.8 is the definitive version... not a preview anymore... – ZEE Nov 12 '20 at 20:10
  • u mean the default rather than not available? please update to reflect what your saying – Seabizkit Nov 12 '20 at 20:32
  • Related post - [Visual Studio 2019 Not Showing .NET 5 Framework](https://stackoverflow.com/q/65724880/465053) – RBT Aug 12 '21 at 07:23

3 Answers3

3

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

Norm Schaeffer
  • 411
  • 3
  • 9
1

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.

-3

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!!!

ZEE
  • 2,931
  • 5
  • 35
  • 47