如何确定.NET应用程序的依赖?应用程序、NET

由网友(☆﹏淺藍sè)分享简介:我如何确定.NET应用程序的依赖?是否的Dependency Walker 工作与管理的应用程序?我已经下载了最新的,并试图分析应用程序,但它只是退出没有太多的解释。如果它不与.NET的工作,然后有一些其他的工具,将帮助我调试运行时DLL加载问题?解决方案 依赖学步车适用于正常的Win32可执行文件。所有.NET的D...

我如何确定.NET应用程序的依赖?是否的Dependency Walker 工作与管理的应用程序?我已经下载了最新的,并试图分析应用程序,但它只是退出没有太多的解释。如果它不与.NET的工作,然后有一些其他的工具,将帮助我调试运行时DLL加载问题?

解决方案

依赖学步车适用于正常的Win32可执行文件。所有.NET的DLL和EXE的有一个小存根头部分,这使得他们看起来像正常的二进制文件,但所有这基本上说是加载CLR - 所以这是所有依赖学步车会告诉你。

要了解哪些东西你的.NET应用程序实际上是依赖于,您可以使用极大优秀 .NET反射从红门。

加载您的DLL进去,点击右键,并选择分析 - 然后你会看到一个依赖的项目,这将显示所有的其他的dll(和内这些DLL的方法),它需要

有时候这个麻烦,虽然,在您的应用程序主要依靠X DLL,和X DLL是present,但是由于各种原因无法加载或位于运行。

要解决这些类型的问题,微软有一个集绑定日志查看器,可以告诉你这是怎么回事的在运行时的

轻松部署 .NET 5 应用程序,这个指南一定不要错过

How do I determine the dependencies of a .NET application? Does Dependency Walker work with managed apps? I've downloaded the latest and tried profiling the app, but it just exits without much of an explanation. If it doesn't work with .NET, then is there some other tool that would help me debug a run-time DLL loading issue?

解决方案

Dependency walker works on normal win32 binaries. All .NET dll's and exe's have a small stub header part which makes them look like normal binaries, but all it basically says is "load the CLR" - so that's all that dependency walker will tell you.

To see which things your .NET app actually relies on, you can use the tremendously excellent .NET reflector from red gate.

Load your DLL into it, right click, and chose 'Analyze' - you'll then see a "Depends On" item which will show you all the other dll's (and methods inside those dll's) that it needs.

It can sometimes get trickier though, in that your app depends on X dll, and X dll is present, but for whatever reason can't be loaded or located at runtime.

To troubleshoot those kinds of issues, Microsoft have an Assembly Binding Log Viewer which can show you what's going on at runtime

阅读全文

相关推荐

最新文章