Visual Studio Development Bookmark and Share   
 index > Visual Studio Debugger > The symbol file assembly.pdb does not match the module
 

The symbol file assembly.pdb does not match the module

Hi all,

I'm having a problem with debugging -- symbols for my assembly are not being loaded. Long story short, I'm writing a WSS 3.0 workflow and deploying it on a remote SharePoint server. So far everything is OK, and the workflow runs.

To debug the workflow, in theory, what I need to do is to attach to the ASP.NET process on the server (w3wp.exe). From there, I should be able to debug the workflow code.

In practice, what happens is that VS complains about symbols not being loaded, and I'm not able to debug. My workflow assembly is being loaded -- I can see it in the modules window. However, for symbol status, I get `Cannot find or open the PDB file'. If I go through the symbol load information, I get this:

C:\WINDOWS\assembly\GAC_MSIL\SimpleWorkflow\3.0.0.0__d0af882641d96b1a\SimpleWorkflow.pdb: Cannot find or open the PDB file.
D:\Home\mpenkov\My Documents\Visual Studio 2005\Projects\SimpleWorkflow\SimpleWorkflow\obj\Debug\SimpleWorkflow.pdb: Cannot find or open the PDB file.
...

It's looking for the PDB file everywhere, including the project obj directory. I've checked that the PDB file is in the obj directory.

So next, I decide to try and load the symbols manually (right-click on SimpleWorkflow.dll in Modules window, Load Symbols) and point it to the PDB file in the obj directory. I get the following error: `The symbol file SimpleWorkflow.pdb does not match the module'.

At this point, I have a number of questions for those who are more knowledgeable in the ways of VS 2005 debugging.

1) Why is this happening?
2) How does VS determine that the PDB file doesn't match the assembly? What does it look at?
3) How can I rectify this? Can I somehow force it to load the symbols from the PDB file anyway?

Lastly, a few points that can clarify my position:
1) The project is being built in Debug mode
2) The assembly is signed. This is a requirement for deploying stuff to SharePoint -- it needs to have a strongname

I hope I haven't missed anything.

So, does anyone have any suggestions? It would be really great, as this thing has me really pinned down at the moment.

Cheers and regards,
Michael

mpenkov  Sunday, October 08, 2006 6:45 AM

This scenario is not supported in the Visual Studio debugger.  You need the original dll's PDB

John

John Cunningham - MSFT  Tuesday, October 31, 2006 5:04 PM

The error "does not match the module" is caused when the signatures (actually a GUID) built into both pdb and module do not match. Common caauses are that updates are not propogated to the GAC properly (for instance did you uninstall and then install the assembly in question after your last rebuild?

John

John Cunningham - MSFT  Wednesday, October 25, 2006 6:27 AM
We have a DLL at customer site and need a matching PDB file for debugging purposes. We can rebuild the exact DLL, plus matching PDB, internally.

How can we make debugger accept the new PDB as a match to the DLL at customer site?
They are not from the same build, but based on the exact same source code.

Rune Christensen  Monday, October 30, 2006 9:22 AM

This scenario is not supported in the Visual Studio debugger.  You need the original dll's PDB

John

John Cunningham - MSFT  Tuesday, October 31, 2006 5:04 PM
I'm just adding this in case it is of use to anyone. This reply is not entirely relevant to mpenkov's issue.

For a project solution (mainly C++) created with VS2005, I have rebuilt (using Incredibuild) the solution from outside the IDE. Subsquently, when attempting to debug, the VS debugger is reporting all the modules as "No symbols loaded".

When trying to manually load the symbols, I get:

"The symbol file <module_name>.pdb does not match the module"

This is the first time I have seen this happen. Incredibuild is normally reliable.

To fix the problem, I closed and re-opened the IDE then loaded the same solution. I then changed the startup project, to be prompted for the executable to debug.

Either one, or both of the above, fixed the problem.
mungflesh  Friday, November 30, 2007 3:30 PM

Hi,

I have recently had this - VS2005 - and it was particular to a remote debugging issue.

I was only shipping the EXE/DLLs, but when I attached remotely, it could not find the symbols. No matter where I put my symbols (or used symstore in a vain hope that it was something to do with my dir structure). The PDB files were the ones compiled at the same time as the EXE/DLL (in 1 project so all together!!!).

Looking at "Symbol LoadInfo" it shows the debugging trying to load the symbols from paths that could ONLY have been on my machine (something like: C:\Source Code\VSS\ICAP RTD Framework\Release\IMDConnect Feed Plugin Setup)...

I managed to put the PDB files onto the remote machine into the directories where the installed files were running from. Then, within my remote debugging session in VS2005, I clicked LOAD SYMBOLS, and sure enough, they managed to load!!!!!!!!!!

And this time "Symbol Load Info" shows the path the installs were running from on the remote!!!

I think this is a bug - VS2005 should be able to load LOCAL symbols which match the REMOTE debug session - OR???

Regards

James

James Joyce  Tuesday, January 22, 2008 12:16 PM
John,

I am beyond frustration with this issue. Is there a solution? I am running visual studio 2008 and cannot debug Javascript. I continue to get "The breakpoint will currently not be hit. The document is not loaded" message.

I've tried several possible solutions to this problem that I've come across in forums to not avail. I am about to flip!

Please point me in the right direction... I'm begging

Thanks
Mickfo  Friday, February 01, 2008 8:16 PM

Please tell me you found a solution for this problem.

My situation is identical except I'm working with MSCRM 4.0.

I also tried loading the symbols manually and received the same message.

I've looked for two days at all the posts on this subject, but no solutions.

Thanks

Desperate Derek

DerekPool  Saturday, March 22, 2008 5:01 AM
Hi All,

I managed to solve this issue which seems to be some kind of bug in VS2005.
I was building in Release configuration and optimize code = false, but it was complaining the debug symbols did not match the assembly, so I built in Debug configuration and manually copied the .pdb to the Release output directory. Things went smoothly and the symbols were loaded.

Hope this helps!

Felipe
felipecsl  Monday, April 14, 2008 2:32 PM

John Cunningham's replay is not an answer. There is the ability to debug workflows. So how do we load the symbols?
Sam Sabel  Tuesday, July 22, 2008 6:54 PM
I am having the same problem.

I added a new empty project to my solution and ever since I have received messages about symbols not being loaded for the document. Then I read about the modules window and manually loading the symbols but I get the "The symbol file xxxxx.pdb does not match the module."msgbox. My .exe was pointing to a .pdb file in another directory (outside of the solution directory). I moved this directory and then was able to try to manually load the symbols which did not work.

I'm working with the CF - a WM6 device.

This is a fairly serious issue for us.

Matt
andematt  Tuesday, August 05, 2008 8:46 PM
Same problem here. Same symptoms, everything. Serious issue for us too. We have VS2005 SP1.
Sirmont  Thursday, January 22, 2009 5:03 PM
Had the same problem here.
Restarting Visual Studio solved everything, as usual :)

Guess I got lucky.

Restarting seems to be the general solution with Microsoft products. Too bad it doesn't work like that in real life.
T-Tim-Timmy  Monday, March 09, 2009 6:40 PM
Did anybody solve this problem?

There are a lot guys having this problem but no answer from Microsoft (bad answer = no answer). We are facing the same problem: "PDB does not match image". How can it be that the pbd file generated by cl or link (whichever does this) does not mach the output file (exe or dll). This means there is either a bug in the generating tool (cl.exe or link.exe) or a Visual Studio 2008 bug.

Our project generated one exe file and one dll file. No warning are shown during compilation and linking. The symbols for the exe are loaded, but they aren't for the dll. The probing paths include also the pdb file path but for that, there is the famous message: PDB does not match image.

Did anybody find workarrounds for this? (Restarting VS makes no sense in our case, because we attach VS debugger to the exe process)

Regards,
Gabriel
Gabriel Petrovay  Tuesday, March 24, 2009 2:58 PM
My problem was caused by one of my projects holding on to an outdated version of another project. For example: projectA references projectB but when I rebuilt the solution projectA didn't get a new copy of projectB (don't know why). So when I gac'ed, the old version of projectB's dll was installed. I fixed it by changing "Copy Local" to true for projectB in projectA's references.

It would be nice if the IDE gave a good reason why the PDB's didn't match. In case, the version of projectB in the gac was couple of days old!
Tundey  Friday, May 29, 2009 2:13 PM
I am also having this problem. I have a Solution with a project that builds as an .EXE and another project that builds as a .dll. All the code in in the same Solution - 2 projects. Everything builds and runs but no way to step into the .dll code. Tried evrything. Whatever Microsoft is doing, something is wrong. Too many folks are having this problem and wasting their time on it. If MS were responsible, they would get the code sample from (me) and solve the problem and post the solution or fix their system I think.
SoftRite  Sunday, August 09, 2009 3:37 PM
SoftRite here - found my problem... Still love to blame Microsoft though and WILL every chance I get! (giggle) What was going on was forsome reason ANOTHER version of my program .dll was residing in Win/System32 directory! It was getting loaded instead of the one in my project even though everthing looked perfect. When I killed the one in Sys32, mine loaded along with debuginfo... Oh well...
SoftRite  Sunday, August 09, 2009 4:37 PM
I have the same problem. In the modules window of VS2005 "No native symbols in symbol file." is displayed and wenn I try to load the pdb manually I get the message box text "The symbol file ...pdb does not match the module". The dlls are not installed or located in the GAC. Have restarted and rebuild the project. What is wrong?
Diana Bulthaupt  Monday, September 28, 2009 2:28 PM
We have a mixed language project and what I can see is, that on all C# modules the symbols are NOT loaded while of C++ modules symbols are loaded. Any idea for the reason?
Diana Bulthaupt  Monday, September 28, 2009 2:45 PM
Check the article at -
http://www.tech-archive.net/Archive/VisualStudio/microsoft.public.vsnet.debugging/2007-08/msg00009.html

I was able to resolve my problem by Turning off the "Just My Code" option in Tools -> Options ->Debugging -> "Enable Just My Code"
hitesh1407  Tuesday, October 06, 2009 8:57 AM

You can use google to search for other answers

Custom Search

More Threads

• debug vs2003 com dll from vs2005
• A fatal error has occurred HRESULT=0x8007000e. Error Code=0x0.
• problem starting program for remote debugging
• DebugDiag not working in amd64 Windows 2003
• Step into code of a linked DLL
• How to debug the Signal handler code ????
• Update web reference crashes VS2008 3.5 SP1
• Debug Step-into referenced library
• Visual Studio Just-In-Time Debuggers
• Can you make the debugger break whenever any caught exception occurs?