MonoGame (the infrastructure that mainly brings XNA to Windows Phone 8) has all namespaces prefixed with Microsoft.Xna.Framework I believe to minimize the number of code changes required when porting your XNA application to MonoGame.
My problem is that I want to access the Microphone class, which, since it has not yet been created in MonoGame, I have to use it internally in the official Microsoft XNA class, for this I need to exclude the explicit forced removal of the standard Microsoft.XNA.Framework.dll The links in .csproj that my MonoGame template has a setting to avoid conflicts, which works fine, and now Microphone is available, but at the same time I created an ambiguity between several key classes that exist in Microsoft standard version and MonoGame.
I get the following errors:
Ambiguous reference:
Microsoft.Xna.Framework.Color
Microsoft.Xna.Framework.Color
This obviously happened because along with the standard XNA library released by Microsoft, I have a link to MonoGame.Framework.dll , which manages the namespace, creating this ambiguity. However, in all cases, I want to access the version of MonoGame.
Any ideas on 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 using Color = Microsoft.Xna.Framework will obviously not work, because both of them are marked the same way in compiled dlls!
source share