【发布时间】:2017-10-30 03:31:27
【问题描述】:
我在 .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 并且如果它需要运行(但不是构建?),为什么它不存在?
【问题讨论】:
-
继续寻找,这里没有错误。需要 mscorlib.dll 是完全正常的,并且缺少 PDB 并不是致命的(并且该消息让您知道 DLL 确实加载了)。
标签: c# visual-studio dll class-library