dotnet / core

.NET news, announcements, release notes, and more!
https://dot.net
MIT License
20.95k stars 4.9k forks source link

Unable to create new app #8263

Closed dilv0055 closed 1 year ago

dilv0055 commented 1 year ago

Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/create Operating System: macos

I'm unable to run create command, specified in docs with the below error

dotnet new blazorserver -o BlazorApp --no-https -f net7.0

operating system version: mac os monterey 12.6.2, error message: "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"

mairaw commented 1 year ago

That error message means you don't have .NET 7 SDK installed as instructed in the previous step.

Either install .NET 7 SDK or you can run the tutorial passing dotnet new blazorserver -o BlazorApp --no-https -f net6.0. However, changes might happen from version to version, so the tutorial is written to work with .NET 7.