title: Can't reference system.drawing.dll
body: <p>i'm trying to resize images with ImageResizer, but keep getting a compilation error</p>
  
  <blockquote>
    <p>"Error    1 The type 'System.Drawing.Bitmap' is defined in an assembly
    that is not referenced. You must add a reference to assembly
    'System.Drawing"</p>
  </blockquote>
  
  <p>Searching for a solution i find several similar questions where the solution is to reference system.drawing.dll to be able to handle images, but when i tried referencing it by:</p>
  
  <p>rightclick project -> add reference -> select COM  ->find the system.drawing.dll </p>
  
  <p>but this gives me another error saying "the activeX type library system.drawing.tlb was exported froma  .NET assembly and cannot be added as a reference. Add a reference to the .NET assebly instead"</p>
  
  <p>And this is where i'm left dumbfounded as what to do next.</p>
  
  <p>Edit:</p>
  
  <p>code where i get the error</p>
  
  <pre><code>public void resizeImage(String originalFile, String thumb)
      {
          ResizeSettings r = new ResizeSettings();
          r.MaxHeight = 200;
          r.MaxWidth = 200;
  
  
        ImageBuilder.Current.Build(originalFile, thumb, r);//this is where i get the first error
      }
  </code></pre>