Hi folks,
I’m trying to configure a MonoGame 3.8.1 environment on Mac, so far without success. After installing Visual Studio for Mac (17,4), I’ve tried a number of IDE and CLI scenarios to create and build an iOS project.
IDE
- Installed extension 3.8.1.303 using IDE. Completed with warning: “The add-in ‘MonoGame.Templates.VSMacExtension,3.8.1.303’ could not be updated because some of its dependencies are missing or not compatible: required MonoDevelop.Core,17.0.6, found: MonoDevelop.Core,17.4.3 required MonoDevelop.Ide,17.0.6, found: MonoDevelop.Ide,17.4.3”.
- Created a new MonoGame iOS app project.
- Build failed with error: “NuGet packages need to be restored before building. NuGet MSBuild targets are missing and are needed for building. The NuGet MSBuild targets are generated when the NuGet packages are restored.”
- NuGet restore failed with error: “MSB4019: The imported project “/usr/local/share/dotnet/sdk/7.0.102/Sdks/Microsoft.NET.Sdk/16.0.1478/targets/Xamarin.Shared.Sdk.MultiTarget.targets” was not found. Confirm that the expression in the Import declaration “;…/16.0.1478/targets/Xamarin.Shared.Sdk.MultiTarget.targets” is correct, and that the file exists on disk.
Unable to create package spec for project.”
CLI
- Installed extension via CLI using “dotnet new install MonoGame.Templates.CSharp”. Completed with error: “Error: Failed to load template from /Users/chrish/.templateengine/packages/MonoGame.Templates.CSharp.3.8.1.303.nupkg(/content/content/MonoGame.Application.UWP.CoreApp.CSharp/.template.config/template.json): Missing ‘identity’.”
- Created app with “dotnet new mgios -o appname”. Build failed with error: “NETSDK1147: To build this project, the following workloads must be installed: ios”
- Ran “dotnet workload restore” to install workloads. Failed with error: “InvalidProjectFileException: The imported project /usr/local/share/dotnet/sdk/7.0.102/Sdks/Microsoft.NET.Sdk/16.0.1478/targets/Xamarin.Shared.Sdk.MultiTarget.targets was not found. Confirm that the expression in the Import declaration ;…/16.0.1478/targets/Xamarin.Shared.Sdk.MultiTarget.targets” is correct, and that the file exists on disk."
Environment:
- macOS Monterey 12.6.2
- 2.6 GHz 6-Core Intel Core i7
- Xcode 14.2 (latest)
- Visual Studio for Mac 17.4 (latest)
I’ve looked at a bunch of issues in the forums regarding individual steps in these scenarios, but it’s unclear if there’s currently a reliable end-to-end Mac installation process. Has anyone faced and overcome these issues recently? My previous environment based on older VS and MG versions is no longer intact, so I’m really hoping to find a way through. Appreciate any advice anyone can provide.