1
\$\begingroup\$

I am trying to port a XNA project to MonoGame which involves a DLL game library that I created. This library uses the IGameComponent, IUpdateable and IDrawable interfaces to load one of my library classes as a GameComponent.

The compiler gives errors related to these interfaces, saying, for example: The type 'Microsoft.Xna.Framework.IUpdateable' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework.Game'...

This would require me to add Microsoft.Xna.Framework.Game to my reference list, which defeats the point of porting to MonoGame. Is there any way these interfaces can be made compatible with MonoGame

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Monogame has it's own IUpdateable. Check you .dll and fix IT'S reference to point to Monogame's framework. \$\endgroup\$
    – Dialock
    Commented Mar 4, 2013 at 1:54
  • \$\begingroup\$ So my library project should have another build, to refer to MonoGame? \$\endgroup\$
    – ChrisC
    Commented Mar 4, 2013 at 4:35

1 Answer 1

2
\$\begingroup\$

You'll need to recompile your DLL game library after changing all the XNA references to MonoGame references.

MonoGame redefines the interfaces under the same namespace but in a different assembly. It makes things easier to port once you understand whats going on, but can make errors like this slightly confusing.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .