.net core 2 中 fuslogvw 的替代品是什么? [英] What's the replacement for fuslogvw in .net core 2?

查看:21
本文介绍了.net core 2 中 fuslogvw 的替代品是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遇到一般使用 .Net 解决 DLL 和程序集的问题时 fuslogvw 使您能够记录绑定尝试,以便您可以准确地看到它正在寻找的位置以及正在发生的事情.

When encountering problems with resolving DLLs and assemblies in general with .Net fuslogvw gave you the ability to log the binding attempts so you could see exactly where it was looking and what was going on.

有一个 github issue 讨论了这个问题,但它并不是很详细COREHOST_TRACE 实际提供的内容,以及获取输出的最佳方式,以及如何解释输出.

There is a github issue discussing this, but it's not exactly got very much detail on what COREHOST_TRACE actually provides, nor the best way to get the output, nor how to interpret the output.

那么,COREHOST_TRACE 是最好的选择吗?

So, is COREHOST_TRACE the best option?

如果有,如何使用?

如果没有,更好的选择是什么?

If not, what's the better option?

我想知道这个一般问题的答案,因为它是一个有用的工具,所以它的用途远远超出了我当前的问题.不过我也在尝试解决一个特定的问题,所以我在下面提供了详细信息.

I'd like to know the answer to this general question, because it's a useful tool to have and so has uses well beyond my current problem. However I am also trying to fix a specific problem, so I've included details of that below.

我正在使用...

  • VS 15.7.2
  • asp.net 核心 2.0
  • 有问题的 DLL 是原生的,并且可以通过 访问DllImport.

有趣的是,当我发布发布版本时,DLL 得到了解决,但在本地运行开发版本时失败.

Interestingly the DLL is resolved when I publish a release build, but fails running locally for development builds.

异常:System.DllNotFoundException:无法加载 DLL 'libwkhtmltox':找不到指定的模块.(来自 HRESULT 的异常:0x8007007E)

有问题的 DLL 正在被复制到输出目录的根目录:

The DLL in question is beinging copied to the root of the output directory:

<ItemGroup>
    <ContentWithTargetPath Include="Dependencieswkhtmltoxv0.12.432 bitlibwkhtmltox.dll">
        <CopyToOutputDirectory>Always</CopyToOutputDirectory>
        <TargetPath>libwkhtmltox.dll</TargetPath>
    </ContentWithTargetPath>
</ItemGroup>

推荐答案

距离最初的问题已经很久了,但是从 .NET 5 开始,有 dotnet trace.请参阅 https://docs.microsoft.com/en-us/dotnet/core/dependency-loading/collect-details.

It's a long time since the original question, but as of .NET 5, there is dotnet trace. See https://docs.microsoft.com/en-us/dotnet/core/dependency-loading/collect-details.

(我是通过 https://github.com/dotnet/runtime/issues/12506#issuecomment-895192112.)

这篇关于.net core 2 中 fuslogvw 的替代品是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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