title: Why i'm getting error on the Microsoft.DirectX.Direct3D.Device?
body: <p>The whole code is very long.
  So i will add here only the relevant lines.</p>
  
  <p>At the top of the form:</p>
  
  <pre><code>private Device D3Ddev = null;
  </code></pre>
  
  <p>Device is Microsoft.DirectX.Direct3D.Device</p>
  
  <p>Then:</p>
  
  <pre><code>private Boolean InitializeDirectX()
          {
  
                  DispMode = Manager.Adapters[Manager.Adapters.Default.Adapter].CurrentDisplayMode;
                  D3Dpp = new PresentParameters();
                  D3Dpp.BackBufferFormat = DispMode.Format;
                  D3Dpp.PresentFlag = PresentFlag.LockableBackBuffer;
  
                  D3Dpp.SwapEffect = SwapEffect.Discard;
                  D3Dpp.PresentationInterval = PresentInterval.One; //wait for vertical sync. Synchronizes the painting with
                  //monitor refresh rate for smoooth animation
                  D3Dpp.Windowed = true; //the application has borders
  
              try
              {
                  D3Ddev = new Device(Manager.Adapters.Default.Adapter, DeviceType.Hardware, pictureBox1.Handle,
                                                                             CreateFlags.SoftwareVertexProcessing, D3Dpp);
                  D3Ddev.VertexFormat = CustomVertex.PositionColored.Format;
                  D3Ddev.RenderState.Lighting = false;
                  D3Ddev.RenderState.CullMode = Cull.CounterClockwise;
  
                  backTexture = TextureLoader.FromStream(D3Ddev, mymem);
                  scannedCloudsTexture = new Texture(D3Ddev, 512, 512, 1, Usage.Dynamic, Format.A8R8G8B8, Pool.Default);
  
                  //sprite is used to draw the texture
                  D3Dsprite = new Sprite(D3Ddev);
  
                  return true;
              }
              catch
              {
                  Logger.Write("error");
                  return false;
              }
          }
  </code></pre>
  
  <p>The error is on the line:</p>
  
  <pre><code>D3Ddev.VertexFormat = CustomVertex.PositionColored.Format;
  </code></pre>
  
  <p>On the Format.</p>
  
  <blockquote>
    <p>Severity  Code    Description Project File    Line    Suppression State
    Error   CS0012  The type 'IsConstModifier' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.VisualC, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.        DopplerEffect.cs    467 Active</p>
  </blockquote>