How should I install and use MonoGame on macOS? Is it better not to use Visual Studio for Mac? Alternative recommendations?

I had some issues with MonoGame Content.mgcb in the last months, I cannot open it.

In addition, I had another issue(I cannot build my iOS project) recently and this issue only occured in one project and I cannot find a solution for the problem:

I want to know if MonoGame works better on macOS if I use an alternative for Visual Studio for Mac or if that wouldn’t change anything on my issues. In addition, I ask this question because I know that Microsoft will stop supporting Visual Studio for Mac next year.

I don’t know if there will be a new MonoGame version release in the next weeks or if it will take much longer until a new version. And I don’t know if it is better to use the prereleases/develop branches on macOS.

I don’t know how to install it in my existing project.

What are the recommendations for the usage of MonoGame on macOS? I have an existing project(iOS project, Android project, project for shared game code) in VS for Mac and I don’t know if I should still use VS for Mac or if I should move now or in the near future to an alternative.
Which program should I use if I want to continue game development on macOS?

I use VS for Mac 17.6.7 (build 417). In addition, I use Visual Studio Code because I use Microsoft Azure.
My iMac(2019):
3,7 GHz 6-Core Intel Core i5
macOS 14.1.2 (23B92)

I would buy a newer Mac if MonoGame would only work on newer Macs in the future.

Answering the title question:

MonoGame, meet VSCode - DarkGenesis - indie development for the new world order (zenithmoon.com)

VS for Mac is discontinued, use VS Code.

There is also another guide on the Discord forum:

Hope this helps.

I used the tutorial to create a new iOS project in Visual Studio Code. But I get the following error and I don’t know how to install the missing workloads.

/usr/local/share/dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1178: The project depends on the following workload packs that do not exist in any of the workloads available in this installation: Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm64 Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-arm64 Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x64 Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x86 [/Users/name/TestVSCodeMono/MyGame/MyGame/MyGame.csproj]
/usr/local/share/dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1178: You may need to build the project on another operating system or architecture, or update the .NET SDK.

In addition, I get the following error when I create an Android project in VS Code:

/usr/local/share/dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To build this project, the following workloads must be installed: android [/Users/name/TestVSCodeMono/MyGame2/MyGame2/MyGame2.csproj]
/usr/local/share/dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1147: To install these workloads, run the following command: dotnet workload restore [/Users/name/TestVSCodeMono/MyGame2/MyGame2/MyGame2.csproj]

How can I install the missing workloads?

Can you ask the question on the discord thread? I am not a Mac user…

Alternatively you can tag @Aristurtle here and ask him :slight_smile:

EDIT

BUT it does say To install these workloads, run the following command: dotnet workload restore

I have run the command sudo dotnet workload restore. But I still get the following error messages:
In the iOS project:

/usr/local/share/dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1178: The project depends on the following workload packs that do not exist in any of the workloads available in this installation: Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm Microsoft.NETCore.App.Runtime.AOT.Cross.net6.ios-arm64 Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-arm64 Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x64 Microsoft.NETCore.App.Runtime.AOT.Cross.net6.iossimulator-x86 [/Users/name/TestVSCodeMono/MyGame/MyGame/MyGame.csproj]
/usr/local/share/dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.ImportWorkloads.targets(38,5): error NETSDK1178: You may need to build the project on another operating system or architecture, or update the .NET SDK. [/Users/name/TestVSCodeMono/MyGame/MyGame/MyGame.csproj]

In the Android project:

/usr/local/share/dotnet/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.EolTargetFrameworks.targets(38,5): error NETSDK1202: The workload ‘net6.0-android’ is out of support and will not receive security updates in the future. Please refer to .NET MAUI official support policy | .NET for more information about the support policy. [/Users/name/TestVSCodeMono/MyGame2/MyGame2/MyGame2.csproj]

I will try later this day on discord if no one responds here.

@Aristurtle Why does the command sudo dotnet workload restore not solve the problem?

1 Like

I also have issues with my mac M1 installation with:
vscode
.NET8
mgcb