问题描述
我在VS2010中将Moles添加到一个项目中,决定不想使用它,然后删除了Moles参考以及.behaviours和.moles程序集.问题是我一再发现Moles在没有我干预的情况下被读入了该项目.在项目外部是否存在某种设置,如果安装了该设置,它将自动添加?
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?
推荐答案
请确保您已执行以下操作:
Be sure you have done the following:
- 删除对痣组件的引用(例如"MyAssembly.Moles")
- 删除参考:Microsoft.Moles.Framework
- 删除所有.moles文件(在解决方案资源管理器中切换显示所有文件"按钮-您必须先选择测试类)
- 删除模具组件"文件夹
- 清理测试项目(在解决方案资源管理器中右键单击该项目,然后选择清理)
- 重建测试项目
- 享受无摩尔测试项目的荣耀
更新(2012年7月2日)我建议转移到.NET 4.5伪造和存根(当前为候选版本).伪造品和存根(Stub)是Moles的产品版本,受到完全支持.
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.
这篇关于为什么Moles会继续沉迷于我的项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!