private void CreateBuildProject() { string projectPath = Path.Combine(_buildDirectory, "content.contentproj"); string outputPath = Path.Combine(_buildDirectory, "bin"); _rootElement = ProjectRootElement.Create(projectPath); _rootElement.AddImport("$(MSBuildExtensionsPath)\\Microsoft\\XNA Game Studio\\v4.0\\Microsoft.Xna.GameStudio.ContentPipeline.targets"); _buildProject = new Project(_rootElement); _buildProject.SetProperty("XnaPlatform", "Windows"); _buildProject.SetProperty("XnaProfile", "Reach"); _buildProject.SetProperty("XnaFrameworkVersion", "v4.0"); _buildProject.SetProperty("Configuration", "Release"); _buildProject.SetProperty("OutputPath", outputPath); foreach (string assm in _pipelineAssemblies) { _buildProject.AddItem("Reference", assm); } _errorLogger = new ErrorLogger(); _buildParameters = new BuildParameters(ProjectCollection.GlobalProjectCollection); _buildParameters.Loggers = new ILogger[] { _errorLogger }; }