title: XNA Creating a custom ModelProcessor
body: <p>I'm trying to follow <a href="http://blogs.msdn.com/b/shawnhar/archive/2006/12/07/rendering-a-model-with-a-custom-effect.aspx" rel="nofollow">this</a> tutorial but I'm getting errors when trying to implement it.</p>
  
  <p>For the lines <code>using Microsoft.Xna.Framework.Content.Pipeline;
  using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
  using Microsoft.Xna.Framework.Content.Pipeline.Processors;</code>
  its telling me: <code>Error  3   The type or namespace name 'Pipeline' does not exist in the namespace 'Microsoft.Xna.Framework.Content' (are you missing an assembly reference?)</code></p>
  
  <p>Every class I try to use is highlighted and telling me something like: <code>Error   8   The type or namespace name 'ModelProcessor' could not be found (are you missing a using directive or an assembly reference?)</code></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using Microsoft.Xna.Framework;
  using Microsoft.Xna.Framework.Graphics;
  using Microsoft.Xna.Framework.Content.Pipeline;
  using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
  using Microsoft.Xna.Framework.Content.Pipeline.Processors;
  
  // TODO: replace these with the processor input and output types.
  using TInput = System.String;
  using TOutput = System.String;
  using System.IO;
  
  namespace Game.Engine
  {
      /// &lt;summary&gt;
      /// This class will be instantiated by the XNA Framework Content Pipeline
      /// to apply custom processing to content data, converting an object of
      /// type TInput to TOutput. The input and output types may be the same if
      /// the processor wishes to alter data without changing its type.
      ///
      /// This should be part of a Content Pipeline Extension Library project.
      ///
      /// TODO: change the ContentProcessor attribute to specify the correct
      /// display name for this processor.
      /// &lt;/summary&gt;
      [ContentProcessor]
      public class CustomEffectModelProcessor : ModelProcessor
      {
          protected override MaterialContent ConvertMaterial(MaterialContent material, ContentProcessorContext context)
          {
              EffectMaterialContent myMaterial = new EffectMaterialContent();
  
              string effectPath = Path.GetFullPath("MyEffect.fx");
  
              myMaterial.Effect = new ExternalReference&lt;EffectContent&gt;(effectPath);
  
              return base.ConvertMaterial(myMaterial, context);
          }
      }
  }
  </code></pre>