Build MonoGame Content on Linux and CI with MGCB
Use the headless MonoGame Content Builder to compile XNB assets on Linux or in CI, then load them with ContentManager—no Windows GUI required.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Use the headless MonoGame Content Builder to compile XNB assets on Linux or in CI, then load them with ContentManager—no Windows GUI required.
MGCB compiles assets into platform-optimized .xnb files at build time. Use it for static content; reserve Texture2D.FromStream for user-generated or post-launch assets. Covers trade-offs, CI/CD, and verification.
Choose between embedding MonoGame’s Content Pipeline in your game project or keeping it separate, with concrete steps, trade‑offs, and verification tips.
Compiling textures and audio into .xnb at build time can eliminate runtime hitches in MonoGame, but it couples your project to an internal binary format. Here is how to decide and how to wire it up.
Learn how to configure per‑platform texture compression (BC7 on Windows, ASTC on Android) in MonoGame's MGCB pipeline, verify the output, and understand the build‑time trade‑offs.
A diagnostic guide to fixing ContentLoadException in MonoGame by auditing the MGCB pipeline, verifying .xnb missing files, and resolving case‑sensitivity issues across platforms.
MonoGame's Content Pipeline compiles raw assets into platform-specific .xnb files at build time, enabling identical runtime loading across all targets. Covers MGCB integration, texture compression, shader translation, custom processors, and async loading.
Learn how to create a MonoGame ContentProcessor that converts raw PNG data into a runtime‑ready texture atlas, register it in an .mgcb file, and load it safely with Content.Load.
Monogame 4.0's transition to .NET 8 introduces a conflict between asynchronous content loading and retry mechanisms that write to shared output paths. The ContentManager.LoadAsync method, added in Monogame 3.7, does not implement safeguards against duplicate writes when a retry operation targets the same file location. This creates a race condition where con