09 November 2011

Why Are Moles Assemblies Still Added To My Project?

Most people using moles, like Dave, encounter the situation where they want to remove Moles from the project.  You delete the hidden MolesAssemblies folder, but Moles just won't go away!  How do you remove moles from a project?

How to Remove Moles From a Project
  • Remove the references to the moles assemblies (e.g. "MyAssembly.Moles")
  • Remove reference: Microsoft.Moles.Framework
  • Remove all .moles files (toggle the "Show all files" button in the solution explorer -- you must select the test class before doing so)
  • Delete the "Moled Assemblies" folder
  • Clean the test project (right-click the project in Solution Explorer, and then select Clean)
  • Rebuild the test project
  • Bask in the glory of a Moles-free test project

No comments:

Post a Comment

Please provide details, when posting technical comments. If you find an error in sample code or have found bad information/misinformation in a post, please e-mail me details, so I can make corrections as quickly as possible.