简体   繁体   English

“无法找到或打开另一个解决方案中找到的类库的PDB文件”

[英]“Cannot find or open the PDB file” of a class library found in another solution

Issue: 问题:

SolutionA (MVC Solution) cannot load the PDB file of one of the class libraries in SolutionB (Business Logic Class Libraries). SolutionA (MVC解决方案)无法加载SolutionB (业务逻辑类库)中的某个类库的PDB文件。 (It loads the other class library pdbs just fine) (它加载其他类库pdbs就好了)

Environment: 环境:

  • .Net 4.0 .Net 4.0
  • MVC MVC
  • C# C#
  • Visual Studio 2012 Visual Studio 2012
  • PDB file found in class library's Debug/bin folder 在类库的Debug / bin文件夹中找到PDB文件
  • PDB file found in all projects(Debug/bin) that reference this class library. 在引用此类库的所有项目(Debug / bin)中找到PDB文件。
  • PDB Creation time is the same as Compile time PDB创建时间与编译时间相同

Local Paths: 本地路径:

• C:\MyPath\WK_SOLUTIONA\Dev_BF\SolutionA
• C:\MyPath\WK_SOLUTIONB\Prod\SolutionB

Where there are references of SolutionA to SolutionB (ie dll reference) a reference path was set (Properties > Reference Paths) 如果有SolutionA到SolutionB的引用(即dll引用),则设置引用路径(Properties> Reference Paths)

Symbol Load Information: 符号加载信息:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\launcher_devbf\0a01d364\380351a5\assembly\dl3\9ae300b0\47b07c94_5317cf01\SolutionBClassLibrary.pdb: Cannot find or open the PDB file.
b:\23\575\src\SolutionBClassLibrary \obj\Release\SolutionBClassLibrary.pdb: Cannot find or open the PDB file.
C:\Windows\SolutionBClassLibrary.pdb: Cannot find or open the PDB file.
C:\Windows\symbols\dll\SolutionBClassLibrary.pdb: Cannot find or open the PDB file.
C:\Windows\dll\SolutionBClassLibrary.pdb: Cannot find or open the PDB file.
C:\Users\R9962~1.SCH\AppData\Local\Temp\SymbolCache\SolutionBClassLibrary.pdb\4c48672e09774c67b9f8001ecafacbd71\SolutionBClassLibrary.pdb: Cannot find or open the PDB file.
C:\Users\R9962~1.SCH\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols\SolutionBClassLibrary.pdb\4c48672e09774c67b9f8001ecafacbd71\SolutionBClassLibrary.pdb: Cannot find or open the PDB file.
C:\MyPath\WK_SOLUTIONB\Prod\SolutionB\bin\Debug\SolutionBClassLibrary.pdb: PDB does not match image.
SYMSRV:  C:\Users\R9962~1.SCH\AppData\Local\Temp\SymbolCache\SolutionBClassLibrary.pdb\4C48672E09774C67B9F8001ECAFACBD71\SolutionBClassLibrary.pdb not found
 
 
SYMSRV:  http://referencesource.microsoft.com/symbols/SolutionBClassLibrary.pdb/4C48672E09774C67B9F8001ECAFACBD71/SolutionBClassLibrary.pdb not found
 
 
http://referencesource.microsoft.com/symbols: Symbols not found on symbol server.

What I have tried: 我尝试过的:

  • Made sure both solutions where cleaned and rebuilt 确保清洁和重建的两个解决方案
  • Cleared symbols cache and manually deleted the contents of the following: C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Temporary ASP.NET Files 清除符号缓存并手动删除以下内容:C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\ Temporary ASP.NET Files
  • Manually inserted the pdb file in the symbols cache C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Temporary ASP.NET File 手动将pdb文件插入符号缓存C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4.0.30319 \\ Temporary ASP.NET File
  • Point symbols path "Load Symbols" to the debug folder of the SolutionBClassLibrary. 将符号路径“加载符号”指向SolutionBClassLibrary的调试文件夹。 Result: "A matching symbol file was not found in this folder" 结果:“在此文件夹中找不到匹配的符号文件”
  • Tools > Options > Debugging > set "Enable .NET Framework source stepping" (for both solutions) 工具>选项>调试>设置“启用.NET Framework源步进”(适用于两种解决方案)
  • Deleted the IIS virtual directory and recreated it. 删除了IIS虚拟目录并重新创建。
  • Debug from the SoltionA into SolutionB SoltionA调试到SolutionB
  • Started debugging from SolutionA and continued debugging on SolutionB . SolutionA开始调试并继续在SolutionB上调试。 Whenever this specific class library is hit it ignores my changes. 每当这个特定的类库被命中时,它都会忽略我的更改。

I found a workaround to achieve the desired result. 我找到了一种解决方法来达到预期的效果。 Basically manually overwritten the dlls that where referenced with the ones that had my changes. 基本上手动覆盖那些引用我的更改的dll。 Since this is a local environment there are no repercussions. 由于这是一个当地环境,因此没有任何影响。

This is however as I said, a workaround and goes outside the point of using reference paths in the first place. 然而,正如我所说,这是一种workaround并且首先使用参考路径。

Edit: Apparently now all my changes are being tracked since I've done this. 编辑:显然现在我的所有更改都被跟踪,因为我已经完成了这项工作。 So this was indeed the correct answer! 所以这确实是正确答案!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法找到或打开PDB文件 - PDB不是用DLL构建的 - Cannot find or open the PDB file - PDB not built with DLL VS Code中的“无法找到或打开PDB文件” - “Cannot find or open the PDB file” in VS Code VS代码“无法找到或打开PDB文件”,即使pdb存在并且加载了其他csproj pdb文件 - VS Code “Cannot find or open the PDB file” even though the pdb exists and it loads other csproj pdb files 找不到或打开PDB文件,调试本机代码 - cannot find or open PDB file, debugging native code C# 远程调试器 - 无法找到或打开 PDB 文件 - C# Remote Debugger - Cannot find or open the PDB file Visual Studio 2013 RC 中的“无法找到或打开 PDB 文件” - “Cannot find or open the PDB file” from Visual Studio 2013 RC 为什么我的Visual Studio会以这种方式开始行动? iisexpress无法找到或打开PDB文件 - Why did my Visual Studio start acting this way? iisexpress cannot find or open the PDB file 在使用C#接口访问SWI-Prolog时找不到或打开PDB文件消息 - Cannot find or open the PDB file message in using of C# interface to SWI-Prolog 无法调试 Systems.Windows.Forms.Control(未找到 PDB 文件) - Cannot debug Systems.Windows.Forms.Control (PDB file not found) 找不到pdb文件 - Unable to find pdb file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM