I know this is an old issue, but i’m having exactly the same issue when setting up a new computer to work, and I haven’t found any decent explanation, most answers being misleading.
This problem seems to happen when you’re trying to load a project created with an old version of MonoGame, and you install the 3.8 monogame extension for VS2019. The .csproj file tries to find a file in a place is no longer created by the new installers.
You probably have two solutions here:
-
Install an old version of MonoGame so that it creates the files. The MonoGame dlls will be stale, but you’ll have the build scripts. As you’ll probably be using nuget to keep monogame up to date this doesn’t matter.
I’ve used this way because I want the project file to work exactly the same in both computers, and I don’t want to mess with 3.8 in the old computer, but if you don’t have this requirement, option 2 will probably be better for you.
3.7.1 is probably your best option MonoGame 3.7.1 -
Modify the .csproj file so that instead of pointing to the old targets file, points to the correct place where the new targets file resides (no idea which is it, as I haven’t followed this path). You can even just delete the line (the content builder won’t work but the project will load) and then work from there afterwards.
The .csproj line is:
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />