Recently a new version of FlatRedBall was released targeting .NET 6.0. This version has a lot of benefits as explained in a previous blog post, but it does introduce one problem for games targeting MonoGame 3.7.1.
You may notice an error that says
Could not load the project <project location> because MonoGame 3.7.1 files are missing.
Fortunately this can be solved fairly easily.
To do so:
- Locate your .csproj file on disk
- Open the .csproj file in a text editor
- Look for and remove the following lines in the .csproj:
Near the top of the file:
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
<MonoGameContentReference Include="content\Content.mgcb" />
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
Why is this happening?