void BuildAndLoadSpriteSheet(string filename) { ContentBuilder builder = new ContentBuilder(XnaVersion.XNA_3_1, null); builder.AddAssembly(String.Format("{0}\\{1}", Application.StartupPath, "XRealEngine.ContentPipeline.dll")); builder.AddFileToBuild(filename, "sheet", "XmlImporter", "SpritesSheetContentProcessor"); builder.AddFileToBuild(filename, "sheet", "XmlImporter", "SpritesSheetContentProcessor"); builder.BasePath = Path.GetDirectoryName(filename); builder.BuildProject(); ContentManager content = new ContentManager(View.Services, builder.ContentPath); View.SpritesSheet = content.Load <SpritesSheet>("sheet"); }