The type ‘Microsoft.Xna.Framework.Matrix’ is defined in an assembly that is not referenced.
May 25, 2011Posted by on
Possible reasons and fixes for the error message:
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=188.8.131.52, Culture=neutral…
- You have references to different Versions of Microsoft.Xna.Framework in your projects. happens easily if you are like me and just import a library project and do not check the XNA version it was built against.
- Classic, you use some cool third party dll and they managed to build it against everything but your XNA version. … but tell you they did on the website. Thanks for that again.
- Content Pipeline Projects are alway, yes really, executed on the PC. Never set Visual Studio to build them for target platform Xbox360 or any CPU. You need x86. Sometimes this is changed automatically… aka you did something stupid and didn’t realise it.
- A C# class library doesn’t do so well as Xbox360 game library. Check your project types and settings.
- As a last resort. Throw all references out and set them new to one specific dll version and rebuild everything. Check where the error occurs and go from there on.
Hope this saves you some sleepless hours.