I may be slightly off base here, but here’s what it looks like from my chair…
When you build a binary with Microsoft Visual Studio .NET 2003 and select to generate a program database, a MSPDBSRV.exe process is spawned. MSPDBSRV generates the PDB (and copies it to the output folder?), then stays running until it is explicitly terminated or the system shuts down. In most cases, you can completely ignore MSPDBSRV.exe and MSPDB80.dll and MSPDBCORE.dll that support it.
If you routinely use multiple versions of the Visual Studio compiler, you may run into occasional difficulties with MSPDBSRV. The error condition is usually accompanied by a “Fatal Error C1902”. A quick search of the MSDN Library indicates that this error means “A program database file (.pdb) was created using a newer version of DBI.dll than the one found while compiling. Install the latest version of DBI.dll on your system.” Unfortunately, that isn’t terribly helpful since DBI.dll appears to have been deprecated.
The two errors I have encountered are:
ERROR: MSPDB80.DLL: unable to connect: unable to spawn mspdbsrv.exe (0x80070002)<C:\Projects\foo\foo.cpp> : fatal error C1902: Program database manager mismatch; please check your installation
This may indicate that MSPDBSRV.exe is missing, corrupt or not in the same path as MSPDB80.DLL (which apparently launches mspdbsrv.exe). Look up the error code (that’s the 0x80070002 in this example) to see what’s going on here.
Fatal Error C1902 program database manager mismatch; please check your installation
This may indicate that your PDB was created using a newer version of MSPDBSRV.
- In most cases, a full rebuild (clean and build) will resolve this.
- Occasionally (ok, once), I had to manually stop the MSPDBSRV.exe that was running, then rebuild.
- If you’re pulling multiple versions of the VC compiler out of a source control depot or from an archive (you do archive your tools along with your source code when you escrow your code, right?) and are re-using the same location, or if you recently updated the VC compiler you are using, it is possible that MSPDBSRV.exe was running at the time you did the copy. Kill the MSPDBSRV.exe process, re-copy MSPDB*.*, and try again.
- God has not spoken to me much the past few days, and I hate it.
- HRESULTs and Win32 Error Codes Introduction