Successfully building content on linux

This one has been driving me crazy for a while now. I have been trying to build simple place holder content and use it in a game. The issue is, which I have read others are experiencing as well, building content on Linux for Linux, just doesn’t work. When loading the content using:

Content.Load<Texture2D> ("Foo")

throws an exception (can’t open as non content) within an exception that says something about the content being built for windows.

After several days of probing an ‘I don’t care to count’ many pages and searches, I found a thread that stated that for some reason MGCB.exe on Linux builds content as if it’s intended for use on Windows using DirectX and in order to build content for the DesktopGL platform, one must build it using Windows. Long story short, I have that option, but it’s waaaaay more system builder work than I want to do right now.

So, last night, I had the idea to just plug some other build target into the pipeline tool and see what happened. Today, I plugged NativeClient in as the build target. Now, I can use the content. Which more or less fixes the whole build issue. I say more or less because sounds are built to AAC, if I read the code correctly.

My questions are does this work for somebody else? and are there any side effects that I should be worried about?

Hi, I realise this is an old-ish post but answering as much for the benefit of others who find it while troubleshooting the same problem (like I did); This is a current problem with the work-in-progress Monogame 3.5 and it does not exist in the latest stable build, 3.4 (at least as far as I have experienced.)

Just install 3.4 as shown here How to install MonoGame 3.4 on Linux and use the “Linux” build target. DesktopGL will (afaik?) replace this in 3.5 but is not an option in 3.4.

You can check your version of Monogame by opening MonoGame Pipeline -> Help -> About

Are you guys trying to build with the commandline compiler call?(That autobuilds when you go to debug your application…) I have used the latest stuff on my Linux debugging (with content compiling) and havent experienced this issue, though on initial use of an application it does seem to default to Windows GL and has 3 different linux entries… Selecting the last Linux entry compiles properly from me (To be clear I do this directly from the Pipeline tool, I do not link the build process with application compile as it has thrown errors for me in the past)

Also @kurzatem as you have mentioned, its place holder. an alternative if you dont have the patience for workarounds or playing with different versions of Mono, it does support running with Raw files(unless you are performance testing against compiled content) such as .ogg or .png etc (The extent of the compatible direct file types are unknown to me) so using the raw files “as placeholder” should be fine as well.