我在其中一个单元测试项目(VS 2010单元测试)中使用Microsoft鼹鼠框架(x86)版本0.94.51023.0。为了测试应用程序中的数据访问层方法,我尝试添加鼹鼠程序集,以便我可以嘲笑 & SqlCommand
对象。当我在添加痣装配内置的单元测试,构建失败,下面的错误细节为System.Data添加痣组件失败
error CS0234: The type or namespace name 'SqlCredential' does not exist in the namespace 'System.Data.SqlClient'
error CS0234: The type or namespace name 'ApplicationIntent' does not exist in the namespace 'System.Data.SqlClient'
结束我的生成输出窗口中显示此:
error MSB3073: The command ""C:\Program Files (x86)\Microsoft Moles\bin\moles.exe" @...\UnitTests\obj\Debug\Moles\moles.args" exited with code -1002.
您是否碰巧安装了VS2012和VS2010? – 2013-03-28 18:32:53
是的,我确实安装了它们。这是否创建了这个DLL不匹配? – 2013-04-04 05:16:25
是的,我相信这是造成问题的原因。 – 2013-04-04 17:55:20