Visual Studio 2010 SP1 and Moling the system dll

Personal reminder because I keep forgetting this step…

Context:

  1. Visual studio 2010 SP1
  2. Moles installed
  3. Building SharePoint unit tests using behaviors
  4. Required to create mole assembly based on the systems.dll
  5. receiving lots of built error including: “System.Net.Moles.SFileWebResponse.Dispose(bool)’: no suitable method found to override”

Try updating the System.moles file to use reflection only:

There I fixed it!

Happy SharePoint unit testing :)

More info:

VN:F [1.9.22_1171]
Rating: 9.3/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)