I've decided to try out SharpDX for my first Windows Phone game but I'm having troubles setting up Content Pipeline working.
I have tried creating an XNA Content Project and dummy XNA Game Library project (just to reference Content project from) but I've got SharpDX.Toolkit.Content.AssetNotFoundException
when I tried to load a texture.
Second try was to use XNA 4.0 Content Compiler to get .xnb file and add it manually to my project but again I've got AssetNotFoundException
.
The Content.RootDirectory
is set to correct value ("Content"
, the name of an XNA Content Project in first try, and a name of folder containing .xnb file in second try), so that's probably not an issue.
So, the real question is, how to load a Texture2D from file in SharpDX project?
SharpDX Toolkit is not a XNA compatible API/implementation, and thus, is not able to load XNA content. It is a high level API for Direct3D11, with some XNA like interfaces/features (SpriteBatch, BasicEffect, ContentManager...etc.) but not binary compatible with XNA. If you want to work with legacy XNA projects, you will have to use a library like MonoGame