如何从CodeLens获取0个引用的类的列表 [英] How to get a list of classes with 0 references from CodeLens

查看:381
本文介绍了如何从CodeLens获取0个引用的类的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常大的EF edmx模型,超过450个类/实体。过去5年来,这种情况有机地增长。使用Visual Studio 2013和CodeLens功能,我注意到有些类列出了0个引用。当我做一些研究,我发现这是真的,我可以从模型中删除该实体。



问题是我必须看看所有450个类在edmx中看看CodeLens是否说有0个引用。有没有报告,出口我可以用CodeLens?是否有任何方法来扩展它以提供这个,如果没有报告?

解决方案

是CodeLenses的要求吗?
我发现几件可以帮助你的东西:




  • 代码分析

  • NDepend

  • Resharper



以下是一些链接:
- http: //blogs.msdn.com/b/habibh/archive/2009/07/31/discover-dead-code-in-your-application-using-code-analysis.aspx
- 在.net项目中查找未使用的类
- https://stackoverflow.com/questions/1413548/visual-studio-find-unused-code


I have a very big EF edmx model with over 450 classes/entities. This has grown organically over the last 5 years. With Visual Studio 2013 and the CodeLens feature I have noticed that some classes have 0 references listed. When I do some research I have found that this is true and I can remove that entity from the model.

The problem is that I would have to look at all 450 classes in the edmx to see if CodeLens says there are 0 references. Is there any report, export that I can get with CodeLens? Is there any way to extend it to provide this if there is no report?

解决方案

Is CodeLenses requirement? I found several things that can help you:

  • Code analysis
  • NDepend
  • Resharper

Here are some links: - http://blogs.msdn.com/b/habibh/archive/2009/07/31/discover-dead-code-in-your-application-using-code-analysis.aspx - Find unused classes in a .net project - https://stackoverflow.com/questions/1413548/visual-studio-find-unused-code

这篇关于如何从CodeLens获取0个引用的类的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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