a matching symbol file was not found in this folder

前端 未结 13 2447
逝去的感伤
逝去的感伤 2020-12-14 14:37

I want to use debug symbols, but I am receiving the following error:

a matching symbol file was not found in this folder

What

相关标签:
13条回答
  • 2020-12-14 14:53

    For BizTalk (and other) projects, it could be because there's a version of the assembly you're trying to debug already in the GAC. When you run a unit test or hit F5 to debug, a new version is compiled locally. However, the version in the GAC is being used, and the newly created PDB doesn't match the DLL in the GAC.

    One way around this is to deselect a build for everything except your unit test project using the Configuration Manager, as shown below:

    0 讨论(0)
  • 2020-12-14 14:54

    I have had this problem recently as well. Was able to fix it by selecting MyProject->Properties->Linker->Debugging->Generate Debug Info->"Optimize for debugging (/DEBUG)".

    0 讨论(0)
  • 2020-12-14 14:58

    I have fixed my debug symbols, forcing them to match using this tool:

    chkmatch tool

    So, my problem was I was trying to debug my project and the debugger couldn't step-in to the in-house nugets sources. I had the source files of the nuget project. Still the visual studio didn't accept the pdb files I was trying to show it to. Showing exact same error:

    a matching symbol file was not found in this folder

    So, what I did was I added this to the .proj file of the nugets project:

    <DebugType>full</DebugType>
    

    And created the dll and pdb file again using the rebuild option. In the command line I ran:

    .\ChkMatch.exe -m name_of_your.dll name_of_your.pdb    
    

    It said this:

    Writing to the debug information file... Result: Success.

    Great success! So, next, I referenced this dll instead to the proj I was trying to debug. I worked when I tried to load the symbol again.

    Hope it helps.

    0 讨论(0)
  • 2020-12-14 15:05

    Without more details as to what you're doing, it's difficult to go beyond "the debugger is looking for a symbol file which matches the compiled code, and couldn't find one in the folder where the compiled code lives."

    Some things to think about:

    1. Are you creating symbols as part of your compilation? (check the project properties)
    2. Are you using a symbol server (if so, does it point to the right place)
    3. Is this compiled code from a third party? In which case, as you apparently have the source, compile it yourself.

    Consider clarifying your question if you want a better answer. Especially what do you mean by "I want use of Symbols".

    0 讨论(0)
  • 2020-12-14 15:05

    I was trying to load symbols for a installed nuget package published on our local dev server. I had to uninstall and add a normal reference built from the code instead. This worked for me. Just remember install the original nuget package again once finished debugging.

    0 讨论(0)
  • 2020-12-14 15:06

    I ran into this problem and the answer was simple.

    Visual studio has two project level settings that can create .pdb files.

    1. Linker: Configuration Properties -> Linker -> Debugging -> Generate Program Database File = "xxxx.pdb"
    2. Compiler: Configuration Properties -> C/C++ -> Output Files -> Program Database File Name = "yyyy.pdb"

    You want #1 for debugging. Forget about #2. Give file #2 a different name than file #1 to solve this error.

    I don't know why microsoft specifies #2 as a .pdb file. That is just confusing.

    0 讨论(0)
提交回复
热议问题