Unreferenced library and similar dlls when porting Skinned Model sample to MonoGame

I’m trying to port the Skinned Model animation sample from XNA to Monogame and I got several dll errors.

To get the SkinnedModelProcessor.cs class to work properly I had to reference the content pipeline dlls and this gives the following errors:

error CS0012: The type 'Microsoft.Xna.Framework.Matrix' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553'.

And a bunch of other errors related to the Matrix struct. Matrix gets recognized and Intellisensed, but still wants the other Matrix class. (It picks up the correct Matrix class when using Microsoft.Xna.Framework.Content.Pipeline.Processors; is removed but then the ModelContent type doesn’t get referenced.

If I add the assembly as the error tells me I get tons of errors about duplicate data types (the MonoGame and XNA ones crashing each other because they have the same name and namespace.).

I’ve found solutions online that edit the .sln file and exclude the XNA assemblies out of the build event, but they don’t seem to do anything. You can view the sample on MSDN, nothing was changed to the code and most classes aside from the SkinnedModelProcessor compile correctly. Any help?

Thanks,

Nick.

1 Like

I am not sure here if you are trying to use the new MonoGame content processor or you’d like to use XNA for that. In my project I still use a phone project (and some hacks to enable xna for VS2013) for content.
Take a look at by blog where I have a working project using this trick and first check if you can compile it to make sure that everything working on your system.
http://blog.nkast.gr/post/2014/02/02/CPU-Skinning-Faster-loading.aspx

I am using a very late version of monoGame (DLLs included). If you are using 3.0.1 then wait a few days, I heard that a new stable release will be out soon.

In case you want the MonoGame content processor, somebody recently added skinned support directly into MonoGame! I am not aware how this works exactly.
ttps://github.com/mono/MonoGame/pull/2253

@nkast: side question, can you tell me what kind of “hacks” did you do to enable XNA for VS2013?
I’ve been able to enable it on VS2012 by installing WP8 SDK, but I’d like to know how to do enable this for VS2013 (and possibly, future versions too) so I can get rid of VS2010 and VS2012 completely.

Install WP8 SDK to VS2012 and them move the WP8SDK/XNA plugin from VS2012 to VS2013. This only allow me to build ‘phone’ content project. When I tried to move the full XNA from VS010 to VS2013 it corrupt the emulators.
Check those links:
http://ryan-lange.com/xna-game-studio-4-0-visual-studio-2012/

As soon as I get my current project released I plan to move to MGCB and get rid of those hacks. Keep only VS2010 around for WP7/XNA and VS2013 for WP8/W8/MonoGame.

1 Like