简体   繁体   English

Visual Studio 2012无法识别单元测试

[英]Visual Studio 2012 not recognize unit tests

I'm struggling with this issue several days. 我几天都在努力解决这个问题。 Visual Studio can't recognize tests in file so I cannot run or debug it. Visual Studio无法识别文件中的测试,因此我无法运行或调试它。 My colleges have own copy and works correctly. 我的大学拥有自己的副本,并且可以正常运行。

I have tried: 我努力了:

  1. Cleared \\AppData\\Roaming\\JetBrains 已清除\\ AppData \\ Roaming \\ JetBrains
  2. Cleared cache inside Resharper, rebuild, deleted .suo file 清除Resharper中的缓存,进行重建,删除.suo文件
  3. Removed all addons: Code maid, Hide main menu, Productivity Power Tools 2012, VS Commands. 删除了所有附加组件:代码服务员,隐藏主菜单,Productivity Power Tools 2012,VS命令。 VsVim and Ankh are installed. VsVim和Ankh已安装。
  4. Unchecked Resharper>Options>Unit Testing>Shadow-copy...., cleaned, rebuild. 取消选中“ Resharper”>“选项”>“单元测试”>“卷影...”,进行清理,重建。
  5. Run VisualStudio as Administrator. 以管理员身份运行VisualStudio。
  6. Test classes and methods are public. 测试类和方法是公开的。
  7. Tried change TEST -> Test Settings -> Default Processor Architecture from x86 to x64. 尝试将TEST-> Test Settings-> Default Processor Architecture从x86更改为x64。
  8. Windows Update run and installed all updates VS Pro 2012 Version 11.0.61030.00 Update 4 Windows Update运行并安装了所有更新VS Pro 2012版本11.0.61030.00更新4
  9. Installed lastest resharper version v7..... 已安装最新版本的共享工具v7 .....

Google is no longer for me, the results of which I had not seen, so guys do you have some tips? Google不再适合我了,但我没有看到结果,所以你们有一些建议吗?

Edit: 编辑:

  1. Tried http://resharper-support.jetbrains.com/entries/23854211-MSTest-Unit-Testing-does-not-work-or-fails-with-error-with-ReSharper-7-1-x 尝试过http://resharper-support.jetbrains.com/entries/23854211-MSTest-Unit-Testing-does-not-work-or-fails-with-error-with-ReSharper-7-1-x
  2. Removed gallio and mbunit from references and download them via nuget. 从参考中删除了gallio和mbunit,并通过nuget下载它们。
  3. Changed VisualStudio project type to be "testable" -> http://www.bryanavery.co.uk/post/2010/06/22/Running-Gallio-tests-within-Visual-Studio.aspx 将VisualStudio项目类型更改为“可测试”-> http://www.bryanavery.co.uk/post/2010/06/22/Running-Gallio-tests-within-Visual-Studio.aspx
  4. When I create new class and try to code some tests, it doesn't work. 当我创建新类并尝试编写一些测试代码时,它不起作用。 The same as above. 与上述相同。 When I create new test solution then it works :( 当我创建新的测试解决方案时,它就可以了:(

Edit2: EDIT2:

Issue is not present if I use NUnit. 如果使用NUnit,则不会出现问题。 So now it concerns to MbUnit . 因此,现在它与MbUnit有关

My colleague found issue, I don't have installed Gallio Resharper plugin ... 我的同事发现问题,我尚未安装Gallio Resharper插件 ...

That's it. 而已。 Thanks for every comment! 感谢您的每条评论!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM