Hey guys I’m trying out MonoGame by building a cross platform project. I am using Visual Studio 2017, on Windows.
I have a single solution with 3 projects.
- Dorothy.Android (The Android project) It builds and runs fine.
- Dorothy.Desktop (Created as shared desktop monogame project) It builds and runs fine.
- Dorothy.iOS (The iOS project) This one is giving me trouble.
When I attempt to compile the iOS project from windows I get the following set of errors
1>------ Build started: Project: Dorothy.iOS, Configuration: Debug iPhone ------
1> Connecting to Mac server 192.168.1.75…
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “MonoGame.Framework”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(2,17,2,20): error CS0234: The type or namespace name ‘Xna’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(3,17,3,20): error CS0234: The type or namespace name ‘Xna’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(4,17,4,20): error CS0234: The type or namespace name ‘Xna’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(11,26,11,30): error CS0246: The type or namespace name ‘Game’ could not be found (are you missing a using directive or an assembly reference?)
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(53,40,53,48): error CS0246: The type or namespace name ‘GameTime’ could not be found (are you missing a using directive or an assembly reference?)
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(74,38,74,46): error CS0246: The type or namespace name ‘GameTime’ could not be found (are you missing a using directive or an assembly reference?)
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(29,33,29,43): error CS0115: ‘Game1.Initialize()’: no suitable method found to override
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(40,33,40,44): error CS0115: ‘Game1.LoadContent()’: no suitable method found to override
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(53,33,53,39): error CS0115: ‘Game1.Update(GameTime)’: no suitable method found to override
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(74,33,74,37): error CS0115: ‘Game1.Draw(GameTime)’: no suitable method found to override
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(13,9,13,30): error CS0246: The type or namespace name ‘GraphicsDeviceManager’ could not be found (are you missing a using directive or an assembly reference?)
1>C:\projects\hereticvisiongames\dorothy\Dorothy\Dorothy.iOS\Game1.cs(14,9,14,20): error CS0246: The type or namespace name ‘SpriteBatch’ could not be found (are you missing a using directive or an assembly reference?)
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
I can’t figure out why there is a missing reference here, I installed the latest MonoGame 3.6 on both my windows and mac machines. I have visual studio mac, on the mac. I also tried installing monodevelop (xamarin studio) but no luck there either. I am also not able to figure out where the MonoGame files have gone after installation on my mac, can someone tell me the path? Perhaps that will help me solve the problem.
After I get this solved, I plan on creating some shared libraries between the all 3 of these projects that will house the actual game code. Is that the best approach?
Any help or guidance is greatly appreciated.
-Kris