core
core copied to clipboard
Error running tutorial command
From: https://dotnet.microsoft.com/en-us/learn/aspnet/hello-world-tutorial/create
Command: dotnet new webapp -o MyWebApp --no-https -f net7.0
Error: Invalid option(s): -f net7.0 'net7.0' is not a valid value for -f. The possible values are: net6.0 - Target net6.0 netcoreapp3.1 - Target netcoreapp3.1
@koffeemate - do you have .NET 7 installed? Run dotnet --list-runtimes in your terminal and you will see something like the following.
➜ dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
If you don't see 7.0.0 listed, you can download and install from https://dot.net.
No answer since November. Closing.