Convert png to xnb

I need to do console application which will work on linux server and convert file from png to xnb moreover I need compessed xnb. Does exist way to do this without microsoft help?

MonoGame SDK for Linux does provide you with console compilation tool called “MGCB” (MonoGame Content Builder). To use it to compile an image simply do:

mgcb \
-workingDir:/home/harry/Documents/Example/ \
-compress:True \
-importer:TextureImporter \
-processor:TextureProcessor \
-build:/home/harry/Documents/Example/Moon.png

Extra texture compression line if you want it:

-processorParam:TextureFormat=Compressed \

Thank you but how to direct reach mode instead HiDef?

Set profile param to Reach, more info: http://www.monogame.net/documentation/?page=MGCB

Also if you don’t know something you can always create a .mgcb file using Pipeline Tool and open it in the text editor (it is just a set of mgcb commands).

Ok, thank you. You are great!

And it exists one problem. Option -outputDir creates strange path

$ mgcb -compress -profile:Reach -build:/home/destructor/IMG.png -outputDir:/home/destructor/

see result here http://joxi.ru/E2pV86Jh9w1qgr

Can it just create file in some folder without creating path?

Set the workingDir argument to “/home/destructor”

Yes I’m glad. This works. Excellent!

Ooo! There is problem compiled content are not opening on all version of monogame.
So It is loading on version monogame 3.0 but on version monogame 2.5 it is not loading with such error:

Could not find matching content reader of type

What is it a bug?