简体   繁体   English

ReSharper 警告仍然显示为 UsedImplicitlyAttribute

[英]ReSharper warning still shown with UsedImplicitlyAttribute

ReSharper warns me about a private method not being called. ReSharper 警告我未调用私有方法。 It is called through reflection, so I don't want to delete the method, and (partly) for this purpose UsedImplicitlyAttribute was designed.它是通过反射调用的,所以我不想删除该方法,并且(部分)为此目的设计了UsedImplicitlyAttribute But ReSharper still warns me, even after decorating the method with that attribute.但是 ReSharper 仍然警告我,即使在使用该属性装饰方法之后也是如此。 It seems like a bug, but perhaps I'm missing some option (ReSharper doesn't have too few of those).这似乎是一个错误,但也许我错过了一些选项(ReSharper 没有太多选项)。 Does anyone have a clue how I can fix that?有谁知道我该如何解决这个问题? Building the project didn't work.构建项目不起作用。

I'm going to assume you've read the documentation on how to incorporate the Code Annotations items into your own code .我将假设您已阅读有关如何将代码注释项合并到您自己的代码中的文档 I have found in the past that R# can be a little flaky with this part of the options:我过去发现 R# 的这部分选项可能有点不稳定:

R# 选项页面

It sometimes takes more than one visit to this page before the namespace that you've copied the declarations into appears in the list.有时需要多次访问此页面才能将声明复制到的命名空间出现在列表中。 But once it does, and you tick the checkbox, it should all then work.但是一旦完成,并且您勾选了复选框,它就应该可以正常工作了。

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

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