gpt4 book ai didi

c# - 为什么我的 .dll 试图加载 mscorlib.dll?

转载 作者:太空宇宙 更新时间:2023-11-03 21:02:22 26 4
gpt4 key购买 nike

我在 .NETCoreApp 1.1 中用 VS2017 做了一个类库,当我尝试从另一个测试项目加载 .DLL 时,出现错误

System.IO.FileNotFoundException: 'Could not load file or assembly 'ABC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.'

在输出中我看到了

'dotnet.exe' (CoreCLR: clrhost): Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.1.2\mscorlib.dll'. Cannot find or open the PDB file.

为什么它要尝试加载该 .DLL 并且如果需要运行(但不是构建?),为什么它还不存在?

最佳答案

Why is it trying to load that .DLL?

一切都加载核心 CLR。这就是定义“int”等类型的地方:始终需要的核心类型。

why is it not already there?

是的。核心库加载成功。消息是调试信息不​​可用。 PDB 文件包含有助于调试器理解 DLL 中信息的信息。如果需要调试信息,请安装调试信息。

另一个程序集由于其他原因无法加载。使用融合日志查看器找出原因。

关于c# - 为什么我的 .dll 试图加载 mscorlib.dll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44248996/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com