title: Moling System.dll
body: <p>I need to unit test a method that is using the <code>System.Net.WebClient</code> in the <code>System.dll</code>. I tried to Mole the <code>System.dll</code>, but when I tried to compile the project to add references to the <code>System.dll</code> mole, I got a bunch of errors like the following:</p>
  
  <p>Error   2</p>
  
  <blockquote>
    <p>'System.Net.Moles.SFileWebResponse.Dispose(bool)': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj]   C:\DGALibrary\DGALib.IO.Tests\m.g.cs    251374  33  DGALib.IO.Tests</p>
  </blockquote>
  
  <p>Error   3</p>
  
  <blockquote>
    <p>'System.Net.Moles.SFileWebResponse.SupportsHeaders': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj] C:\DGALibrary\DGALib.IO.Tests\m.g.cs    251575  30  DGALib.IO.Tests</p>
  </blockquote>
  
  <p>Error   4</p>
  
  <blockquote>
    <p>'System.Net.Moles.SHttpWebResponse.Dispose(bool)': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj]   C:\DGALibrary\DGALib.IO.Tests\m.g.cs    255264  33  DGALib.IO.Tests</p>
  </blockquote>
  
  <p>Error   5</p>
  
  <blockquote>
    <p>'System.Net.Moles.SHttpWebResponse.SupportsHeaders': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj] C:\DGALibrary\DGALib.IO.Tests\m.g.cs    255465  30  DGALib.IO.Tests</p>
  </blockquote>
  
  <p>Error   6</p>
  
  <blockquote>
    <p>'System.Net.Moles.SWebResponse.Dispose(bool)': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj]   C:\DGALibrary\DGALib.IO.Tests\m.g.cs    303123  33  DGALib.IO.Tests</p>
  </blockquote>
  
  <p>Error   7</p>
  
  <blockquote>
    <p>'System.Net.Moles.SWebResponse.SupportsHeaders': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj] C:\DGALibrary\DGALib.IO.Tests\m.g.cs    303324  30  DGALib.IO.Tests</p>
  </blockquote>
  
  <p>Error   8</p>
  
  <blockquote>
    <p>'System.Net.Moles.SFileWebResponse.Dispose(bool)': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj]   C:\DGALibrary\DGALib.IO.Tests\m.g.cs    251374  33  DGALib.IO.Tests</p>
  </blockquote>
  
  <p>And finally</p>
  
  <p>Error   28</p>
  
  <blockquote>
    <p>The command ""C:\Program Files\Microsoft Moles\bin\moles.exe" @C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\moles.args" exited with code -1002.   DGALib.IO.Tests</p>
  </blockquote>
  
  <p>Are we not able to mole <code>system.dll</code>?</p>