4

I've installed .NET 5 SDK both x64 and x86 and updated visual studio to the latest version. Restarted the computer and visual studio many times, the only options it allows me are .NET Framework up to version 4.8.

.NET 5 does not appear in the new project window of visual studio either.

How can I make .NET 5 appear so I can update my project to it?

Target Framework Dropdown list not displaying .NET 5.

Visual studio is up to date message.

Issung
  • 385
  • 3
  • 14
  • `.NET 5 does not appear in the new project window of visual studio either.` it's there, for quite some time. All VS 16.8 previews had the option. .NET 5 is .NET *Core* 5 though. You're asking how to migrate. What type of application are you trying to migrate? You may be able to use the `try-convert` tool to convert the project types at least – Panagiotis Kanavos Nov 11 '20 at 07:47
  • https://www.nuget.org/packages/try-convert/ – Hans Passant Nov 15 '20 at 16:34

2 Answers2

11

.NET 5 is not an upgrade to .NET Framework 4.8 in the sense that .NET Framework projects can be seamlessly upgraded to later version. .NET 5 is .NET Core, so .NET Core 2.x and .NET Core 3.x can be upgraded to that path. You'll have to port your project instead, and that's far more involved than simply changing a dropdown.

Martheen
  • 5,198
  • 4
  • 32
  • 55
-8

As the .Net 5 is not released you will not find it in the list. open the .csprj file by double-clicking on the project and change the framework manually.

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
  </PropertyGroup>
</Project>

Then in your project enable preview NuGet packages and update to the new pre-release framework.

have a look at https://learn.microsoft.com/en-us/aspnet/core/migration/31-to-50?view=aspnetcore-5.0&tabs=visual-studio, you will find some more tips there

UPDATE I just now did the update of visual studio and installed 5.0 using the framework download at https://dotnet.microsoft.com/download/dotnet/thank-you/sdk-5.0.100-windows-x64-installer and I now have 5.0 in the drop-down at the top of my list of frameworks. looks like the order is not latest at the bottom.

enter image description here

Walter Verhoeven
  • 3,867
  • 27
  • 36
  • it is released... today – Keith Nicholas Nov 11 '20 at 03:38
  • also your link is for upgrading from .net core 3.1 – Keith Nicholas Nov 11 '20 at 03:41
  • @KeithNicholas, did you update your visual studio to 16.8.0 release? – Walter Verhoeven Nov 11 '20 at 03:43
  • You get the option for .NET 5.0 because the project originally targets .NET Core. Compare with the OP screenshot where the project originally targets .NET Framework, so the dropdown only shows .NET Framework and Unity. To get .NET Core showing up there, OP would need to [port](https://learn.microsoft.com/en-us/dotnet/core/porting/) – Martheen Nov 11 '20 at 04:09
  • 2
    @WalterVehoeven .NET (Core) 5 was available as an option in all VS 16.8 previews for several months. The .NET 5 SDK download page made it clear which VS version was required for each preview. The OP is asking how to migrate from .NET Old to .NET Core 5 though, which can't be done through a dropdown – Panagiotis Kanavos Nov 11 '20 at 07:45