I have an XNA project that I'm trying to port over to Android using MonoGame, but I get the following errors:
When I add a project reference my XNA game I get, "The Target Framework version for the project is higher than the current project Target Framework version. Would you like to add this reference to your project anyway?"
So I say yes, and then it gets a warning flag in Visual Studio's Solution Explorer. When I build, I get the error:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(609,5): error : The OutputPath property is not set for project 'XXXXXXXXX.csproj'." . Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.
So I'm thinking that the reference to my XNA game is the problem. It's Target Framework is .NET Framework 4 and my Android project target is Android 2.2.
I've read[1] that Android doesn't have .NET 4, so I'm thinking that's the problem but I've attempted to make a class library to reference, but I'm not sure how that would work exactly. I've added a reference to my XNA game in my class library and added a reference to my class library from my MonoDroid project, but now I can't create an instance of my XNA game (i.e. when I try to do Game1.Activity = this; it doesn't recognize Game1).
Am I missing something obvious? This has been bugging me for several hours!
EDIT: To clarify, I have 3 + 2 projects: an XNAGame, MonoDroidApp (using MonoGame Framework), and MonoDroidLib (Mono for Android Library), plus Lidgren.Network.Android and MonoGameFramework.Android.
If I understood correctly, I was supposed to basically trick the compiler by making a reference in MonoDroidLib to XNAGame and making a reference from MonoDroidApp to MonoDroidLib. I thought if it worked, I would indirectly reference XNAGame in MonoDroidApp and be able to make an instance of XNAGame, it didn't work.
1: Prexisiting dlls (.NET 4 framework) issue with mono for android