Build failing, error NETSDK1013

I’ve got an annoying error when trying to build a MonoGame project. Every time I run the build command it gives the error:

error NETSDK1013: The TargetFramework value ‘net10P.0’ was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly.

In my csproj the value is correct:

<PropertyGroup>

    <OutputType>WinExe</OutputType>

    <TargetFramework>net10.0</TargetFramework>

    <RollForward>Major</RollForward>

    <PublishReadyToRun>false</PublishReadyToRun>

    <TieredCompilation>false</TieredCompilation>

  </PropertyGroup>

I’m not new to programming (been doing for 7 years), but I’m new to dotnet and C#. I’m following the tutorial on 2D games, nothing gave me problems until the build in chapter 25. I’m staring at the screen for a couple of hours, no googling helped me. I just want to finish this and make sure I can start my own project with no headaches.

I would do a search for net10P.0 in your entire folder, looks like a typo somewhere.

That’s the first thing I did. No matches.
Both folders:

For arguments sake, can you try the following and build again?

<TargetFramework>net9.0</TargetFramework>

Additionally, what OS are you running on and which dotnet package did you install for your OS?

The only other thing I can think of if there is some encoding we cannot see but the compiler can.

You could try just generating a blank project from one of the MG templates and building that too, as they should be clean.