ReSharper的标志我对NUnit的测试,未使用 [英] Resharper marks my NUnit tests as unused

查看:93
本文介绍了ReSharper的标志我对NUnit的测试,未使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2008和NUnit的2.6.3与ReSharper的8.2一起

I'm using Visual Studio 2008 and NUnit 2.6.3 together with Resharper 8.2

ReSharper的认识我的单元测试(这样我就可以用ReSharper的运行它们),但尚未它们都标记为未使用(类以及个别的测试方法)。我知道如何镇压警告,在每个测试类注释,但我正在寻找一个解决方案,而这样的评论,因为他们也影响到测试代码确实是不用的(因此我应该警告)。

Resharper recognizes my Unit tests (so I can run them with Resharper) but yet they are all marked as unused (classes as well as the individual test methods). I know how to suppress the warning with a comment at each test class but I am looking for a solution without such comments because they also affect test code that is really unused (and thus I should be warned).

从我的理解这应该制定出NUnit的测试箱,但我不能管理,使其工作。我是否需要更改一些设置?我GOOGLE了相当一段时间,但没有发现任何东西。

From my understanding this should work out of the box for NUnit tests but I can't manage to make it work. Do I have to change some settings? I googled quite a while but didn't find anything.

推荐答案

您需要安装ReSharper的ExternalAnnotations来解决这个问题。 VS2008不支持ReSharper的扩展管理器,所以请手动安装:

You need to install ReSharper ExternalAnnotations to solve the problem. VS2008 does not support ReSharper Extension Manager, so please install it manually:


  1. 下载的的NuGet包;

  2. 使用任何归档软件,如WinZip的打开它

  3. 从提取 .. \ReSharper\vAny\annotations\ 所有文件夹ç :\Program文件(x86)\JetBrains\ReSharper\v8.2\Bin\ExternalAnnotations ;

  4. 然后重新启动Visual Studio;

  1. Download nuget package;
  2. Open it using any archiver software like WinZip;
  3. Extract all folders from ..\ReSharper\vAny\annotations\ to C:\Program Files (x86)\JetBrains\ReSharper\v8.2\Bin\ExternalAnnotations;
  4. Then restart Visual Studio;

这篇关于ReSharper的标志我对NUnit的测试,未使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆