Modern Equivalent of Visual Studio 6 “Depends” uti

2019-02-22 21:44发布

Is there a good tool that will look at a .NET assembly and tell you all of the dependencies it has on other assemblies? Sort of like the old depends.exe from VS6 days.

UPDATE
I guess the one thing that I am missing from Reflector is verion #'s. Unless I am missing something. How do I tell what framework is required by an assembly?

I'm trying to solve this other issue I am having:
IronPython, Click Once, .NET 2.0 Error - thoughts?

From the error message it looks like I need:
Microsoft.Linq.Expressions.Compiler.Snippets
Microsoft.Linq.Expressions.Compiler.LambdaCompiler

Other than the app blowing up on me... how should I have detected a need here? It runs fine on my machine.

Is this a 3.0 or 3.5 thing?

6条回答
Explosion°爆炸
2楼-- · 2019-02-22 21:56

NDepend
But I think it is not free.

EDIT: Reflector Open the assembly. Right click -> Analyze. It will show which assemblies, the current assembly depends upon.

查看更多
祖国的老花朵
3楼-- · 2019-02-22 21:56

Reflector has some addins that should help with this.

查看更多
小情绪 Triste *
4楼-- · 2019-02-22 21:58

The best equivalent of depends.exe for .NET, i.e. a tool that shows what assemblies are loaded at runtime (as opposed to Reflector's static(?) analysis) is the MS Assembly Binding Log Viewer (or fuslogvw among friends :)

It logs all assembly loading infomation - including dinamically loaded assemblies.

alt text http://i.msdn.microsoft.com/dynimg/IC65195.gif

查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-02-22 22:12

Umm, .NET Reflector?

Edit: To find detailed information on the assemblies required by a given assembly, load the assembly into Reflector, and expand the namespace. You should see the assembly name listed. Expand that and you will see "References". Expand References to view the assemblies required. Selecting one of those will give version and name info below.

Hope that helps.

查看更多
Deceive 欺骗
6楼-- · 2019-02-22 22:12

The FusionLog utilities should help you track down what assemblies are being looked for and where it was searching for and finding them, or not. It will also tell you the version being searched for. (And it comes as part of the .NET SDK)

查看更多
迷人小祖宗
7楼-- · 2019-02-22 22:15

If you want a tool that comes with the Microsoft SDK (rather than third party) use ildasm.exe, the .NET assembly disassembler. While it won't show code in anything but IL, it will show metadata, names and assembly dependencies.

查看更多
登录 后发表回答