Converting XNA cpu skinning sample to MonoGame


I’m trying to convert the famous XNA sample to a MonoGame project.
Reading here and there, i’ve understood that there are assembly problems with this project, and the simplest is to include files in a new MonoGame project.

So i did: i’ve created with monodevelop a new MonoGame App (MonoGame cross platform desktop project), and compiled it for checking: blue screen, it’s okay.
I’ve called this project cpuskinning_monogame.

Then, i add another new project, still a MonoGame App.
I’ve called it CpuSkinningDataTypes, for importing inside the original one from XNA samples.
So, i’ve got an exact copy of the previous project, i guess i could delete some files inside, but don’t know exactly which ones, so i leave all as it is (for the moment).

Then, on CpuSkinningDataTypes, i right-click and then select Add / Add Files From Folder.
For importing, i’ve checked all the files in the dialog box.
I remove Program.cs and Game1.cs, previously generated files that i don’t want in this project, as it’s only types definitions.

Then, just to check it’s okay, i add in my main project (cpuskinning_monogame):

using CpuSkinningDataTypes;

And i add the project CpuSkinningDataTypes as a reference in my main project.

As i had some troubles when compiling first time (monodevelop was searching a Main method in CpuSkinningDataTypes) , i’ve defined the imported project as a library (right-click, Options, Build / general menu entry, , Code generation compile target: library).

I think i can do the same with the other projects from the original XNA sources.

But anyway i’m a bit lost. I’ve spent almost a whole day just for this tiny result. And i’m not even sure it’s the good method to do it.

If you have read so far, i deserve your advice.

Do you think i can succeed going this way ?

Or do you have suggestions for better results ?

Or even, maybe someone already converted XNA sample to monogame ! Believe me, i’ve searched before trying to do it myself.

Thank you ! :slight_smile:

You can create a standard “Class Library” and then add the Monogame.Framework.dll reference from C:\Program Files (x86)\MonoGame\v3.0\Assemblies.

As for the other part of CPUSkinning sample , you can create an importer with a ‘MonoGame Content Pipeline Extension Project’. Or create a Class Library and add references to Monogame.Framework.dll, Monogame.Framework.Content.Pipeline.dll and CpuSkinningDataTypes.