.NET 5 not available in Visual Studio 2019

Visual Studio.Net 5

Visual Studio Problem Overview


I have downloaded and installed .NET Core 5.0 SDK (v5.0.100-preview.1) in my Visual Studio 2019. But it is not available in Target framework. Am I missing something?

Visual Studio Solutions


Solution 1 - Visual Studio

You need to install the latest preview of Visual Studio 2019 16.8, refer to

https://devblogs.microsoft.com/aspnet/asp-net-core-updates-in-net-5-preview-1/

You also need to explicitly enable preview versions within Visual Studio itself:

enable previews

Then you should see it:

enter image description here

Solution 2 - Visual Studio

Specs: VS Version 16.8.0

Target Version of .Net Core: 5.0

You must have version 16.8.0 in order to have .Net Core 5.0

If you still have problems with Visual Studio not showing .Net Core 5.0 in Visual Studio version 16.8.0 (and assuming you downloaded the .NET Core 5.0 SDK for Visual Studio), well, apparently (and correct me if I'm wrong) it is now called just .Net 5.0, omitting the Core.

enter image description here

After selecting .NET 5.0, I was able to install other libraries which are currently version 5.0+ and dependent on .NET Core 5.0+

Is the new name intentional? Anyways, here some evidence of this working (I was able to install the newest version of Newtonsoft and Entity Framework for .Net Core):

enter image description here

Funny enough, when I try to create a new .Net Core project, the version shows up as expected:

enter image description here

Solution 3 - Visual Studio

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

Solution 4 - Visual Studio

Maybe a bit late to the party. Please note that if you've selected a 'regular' .NET Framework application you won't see the .NET 5.0 Framework option. This is only visible in .NET Core project styles.

Solution 5 - Visual Studio

Try to set it in your .csproj file. Right click (maybe unload) and edit (within a PropertyGroup-element):

    <TargetFramework>net5.0</TargetFramework>

Solution 6 - Visual Studio

Targeting .NET 5 (rc2) doesn't work smoothly in VS Version 16.8.0 Preview 6.0

I could only target .NET 5 by manually changing the .csproj file, and adding:

<TargetFramework>net5.0</TargetFramework>

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionHamid NoahdiView Question on Stackoverflow
Solution 1 - Visual StudioRyanView Answer on Stackoverflow
Solution 2 - Visual StudioLuisDev99View Answer on Stackoverflow
Solution 3 - Visual StudioNorm SchaefferView Answer on Stackoverflow
Solution 4 - Visual StudioDon HView Answer on Stackoverflow
Solution 5 - Visual StudioMartin.MartinssonView Answer on Stackoverflow
Solution 6 - Visual StudioZP007View Answer on Stackoverflow