MonoGame (a framework which basically brings XNA to Windows Phone 8) has all it's namespaces prefixed with Microsoft.Xna.Framework
I believe to minimise the amount of code changes required when porting your XNA app to MonoGame.
My issue is, I wish to access the Microphone
class, which, because has not been created in MonoGame yet, I have to utilize it from within in the official Microsoft XNA class, this requires taking out the explicit forced removal of the standard Microsoft.XNA.Framework.dll
references within the .csproj that my MonoGame template has setup to avoid conflicts, which works great and now Microphone
is accessible, but in doing so I have created ambiguity between a few key classes which both exist in Microsoft standard issue and MonoGame.
The errors I am receiving are:
Ambiguous reference:
Microsoft.Xna.Framework.Color
Microsoft.Xna.Framework.Color
This has obviously occurred because alongside the standard Microsoft-issued XNA library, I have a reference to MonoGame.Framework.dll
which commandeers the namespace, creating this ambiguity. However, in all instances, I wish to access the MonoGame version.
Any ideas how I can explicitly tell the compiler to use the MonoGame version of the Color
and Vector2
class and not the official Microsoft one?
Any attempt in a using Color = Microsoft.Xna.Framework
obviously won't work because they are both labelled the same in the compiled dlls!