I'm trying to develop a cross platform application. Currently I have set up following solutions, with their platform specified template:
- GameBase
- Windows
- Xbox
- WindowsPhone
The Windows, Xbox and WindowsPhone uses the GameBase as reference, but I want to separate different code for each platform used in the GameBase library as the example below:
#if WINDOWS graphics.PreferredBackBufferWidth = 640; graphics.PreferredBackBufferHeight = 480; graphics.ApplyChanges(); #elif WINDOWS_PHONE TargetElapsedTime = TimeSpan.FromTicks(333333); InactiveSleepTime = TimeSpan.FromSeconds(1); #endif
It does not work, and I can see that in the Configuration Manager, that GameBase's platform is Any CPU, so I wonder if it has anything to due with the GameBase being a Class Library?
If so how do I fix it, and if possible I would like to keep the #if tags.
Directory setup | Windows Solution Game.cs | Solution Explorer