Why does Moles keep getting readded to my project?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 04:48:21

问题


I added Moles to a project in VS2010, decided I didn't want to use it and then removed the Moles reference and the .behaviours and .moles assemblies. The problem is that I repeatedly find Moles has been readded to the project with no intervention from me. Is there some kind of setting external to a project that will auto-add it if it's installed?


回答1:


Be sure you have done the following:

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

UPDATE (2 JULY 2012) I recommend shifting to .NET 4.5 Fakes and Stubs (currently in Release Candidate version). Fakes and Stubs are the productized version of Moles, and are fully supported.



来源:https://stackoverflow.com/questions/6504741/why-does-moles-keep-getting-readded-to-my-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!