8

I am having trouble setting up Microsoft .NET Framework source code debugging for both Visual Studio 2008 and 2010 on Windows 7 x64 (I am having similar trouble on Vista x86 too).

I have followed instructions from this blog post as well as some other resource but without much success. I have also downloaded and installed all symbols from Microsoft Reference Source Code Center and followed their instructions also with no success.

It seems as if Visual Studio keeps loading PDBs without source code in them. It also keeps downloading PDBs even though a proper local cache exists.

This seems like a straightforward thing to do but I must keep repeating some errors in the setup procedure.

1
  • I think it has something to do with Target Platforms. Last night I managed to get it working when i did x64bit build on a win7 vs x86 but just tried to replicate on a new VHD and its back to "No source Available" no idea..
    – Scott
    Nov 10, 2010 at 0:21

3 Answers 3

6

It is the blackest of black arts to get that going, I futzed for a long time to get the 3.5 reference source going. Never got 4.0 figured out yet.

One problem I discovered is the symbol cache. If you've been debugging with the symbol server enabled before trying to get the reference source going then it it is filled with the wrong .pdb files, the ones that don't have source info. I fixed that by copying the .pdbs from the reference source (downloaded with the Massdownloader) by hand into the symbol cache directory, overwriting the bad ones. Pay dirt.

4
  • +1, but I am afraid I have lost so much time today with this issue that I need some kind person to teach me baby steps to make this work. One funny thing I realized... My debugging endeavor prompts me to locate PresentationCore.pdb. Its public key token is 31bf3856ad364e35 and my ReferenceSource cache has exactly 9 other versions of this PDB but not the one required. Go figure.
    – wpfwannabe
    Sep 13, 2010 at 19:05
  • 1
    Has this anything to do with Windows 7 x64?
    – wpfwannabe
    Sep 13, 2010 at 19:10
  • I've not managed to get this working in VS2010 yet; targeting 3.5 or 4 on x64. Perhaps I'll wait for a full moon.
    – Jeb
    Mar 14, 2012 at 16:05
  • There's definitely more trouble with .NET 4, they are shipping a lot of updates and security patches. Microsoft acknowledged that they can't keep up. Mar 14, 2012 at 16:19
2

Ok from what I can tell the following could be the reasons for why you don't get access etc.

Make sure you have .NET 4.0 as your target build when using Windows 7 + x64 + VS2010. The .NET 3.5 won't work, as it has to do with Microsoft not releasing the source for these symbols via the Public Symbol Source Service. You can get the 3.5 Sp1 etc at http://referencesource.microsoft.com/netframework.aspx

I'm not sure why you also have to specify your builds as x64 and not Any CPU or x86 in order to get this work, but yet, there ya go it's the case at the moment (for this specific scenario). If I try use either of these two I get zero access to source (Symbols Load normally but no access).

Hope that helps? this took me a day and a half of mucking around trying to figure out why so its not a lot but it works.

1
  • Changing the project settings to .NET 4.0 and targeting x64 (vs x86) definitely got this working for me, and allowed me to track down the problem I was having. Thanks! Jan 3, 2011 at 20:00
1

I am not sure if this matches your problem but have a look at this KB-article, maybe you have this kind of problem:

http://support.microsoft.com/?scid=kb%3Ben-us%3B957912&x=7&y=9

It is about Visual Studio not being able to recognize breakpoints nor stepping through your source code.

1
  • +1, Thanks for trying but this does not seem to apply. I am suffering from some misconfiguration disease.
    – wpfwannabe
    Sep 13, 2010 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.