core icon indicating copy to clipboard operation
core copied to clipboard

Error running tutorial command

Open koffeemate opened this issue 3 years ago • 1 comments

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 avatar Nov 09 '22 02:11 koffeemate

@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.

leecow avatar Nov 09 '22 16:11 leecow

No answer since November. Closing.

carlossanlop avatar Jan 30 '23 22:01 carlossanlop