public ContentBuilder(XnaVersion version, ILogger logger) { this.XnaVersion = version; this.Logger = logger; this.assemblyManager = new AssemblyManager(); this.contentFileManager = new ContentFileManager(); this.BasePath = null; assemblyManager.AddAssembly(String.Format("Microsoft.Xna.Framework.Content.Pipeline.FBXImporter, Version={0}.0.0, PublicKeyToken=6d5c3888ef60e27d", GetXnaFrameworkVersion(version))); assemblyManager.AddAssembly(String.Format("Microsoft.Xna.Framework.Content.Pipeline.XImporter, Version={0}.0.0, PublicKeyToken=6d5c3888ef60e27d", GetXnaFrameworkVersion(version))); assemblyManager.AddAssembly(String.Format("Microsoft.Xna.Framework.Content.Pipeline.TextureImporter, Version={0}.0.0, PublicKeyToken=6d5c3888ef60e27d", GetXnaFrameworkVersion(version))); assemblyManager.AddAssembly(String.Format("Microsoft.Xna.Framework.Content.Pipeline.EffectImporter, Version={0}.0.0, PublicKeyToken=6d5c3888ef60e27d", GetXnaFrameworkVersion(version))); }
private static string GetXnaFrameworkVersion(XnaVersion version) { switch (version) { case XnaVersion.Xna20: return("2.0"); case XnaVersion.XNA_3_0: return("3.0"); case XnaVersion.XNA_3_1: return("3.1"); default: throw new ArgumentException("This version of the XNA Framework in not supported"); } }