Run the console app by typing dotnet run and you will see an error as follows
C:\Program Files\dotnet\sdk\5.0.201\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(92,5): error NETSDK1013: The TargetFramework value 'net5.0'
was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly.
Reformatting is sometimes needed to increase readability. Unfortunately, the current state of dotnet build system does not like spaces. Please kindly let users reformat the .csproj with extra spaces.
How to reproduce:
dotnet console
code .
.csproj
and pressShift+Alt+F
to reformat the contents. The reformatted contents will look like the following.dotnet run
and you will see an error as followsReformatting is sometimes needed to increase readability. Unfortunately, the current state of dotnet build system does not like spaces. Please kindly let users reformat the
.csproj
with extra spaces.Thank you!