Decompile xnb files?


Iv’e downloaded a demo source and it only contains the xnb files rather than the original image files (png?) is there a way to decompile the xnb files back into the original form?


MonoGame is mostly compatible with XNA-built XNB files (on desktop platforms), so you can just copy them to your output directory. Some XNB files aren’t compatible such as effects, but for the most part they are.

Thanks for that, but I actually want to view and modify the images and then rebuild.

Load them into a small test application, then use Texture2D.SaveAsPng(Stream, int, int). That should work.

Great, thanks didn’t know about the SaveAsPng method. :slight_smile: