I've been trying to upgrade my ASP.NET project in Visual Studio from the .NET 4.7.2 framework to .NET 5. I can't figure out what the problem is, because I've tried several different things and none of them have made .NET 5 available.
- I've installed the latest version of Visual Studio Community 2019,
version 16.8.4.
- I've installed .NET 5.0.102. The Command Prompt confirms this when I
type
dotnet --version
.
- In Visual Studio's Tools > Options > Environment > Preview Features,
I've enabled "Use previews of the .NET Core SDK", and restarted the
program.
- In Visual Studio Installer, I've selected Modify > Individual
components. The .NET 5.0 Runtime is installed, but there's nothing
listed for a .NET Framework 5; the highest listed is 4.8.
- I've tried restarting the program and my computer, and reinstalling both Visual Studio and the .NET 5.0.102 framework.
The About window in Visual Studio says that my .NET version is 4.8.040. The most recent .NET framework that I can select in my project is 4.7.2. Creating a new project doesn't offer a newer version either.
I want to work with C# 9.0, but my project is stuck in 7.3. Any idea what I'm doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…