Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Studio 2010 Symbol Server Does Not Include Source Code

I have VS Studio 2010 SP1 installed and there was a time when source stepping was working great. Something has changed and now when the pdb files are downloaded they are the version that has the source code stripped out.

What I can't figure out is how to get VS to download the pdb files that have the source code in them. I have the same setup on 2 different machines and 1 machine downloads the pdb's with source and the other one does not.

I have been fighting for hours trying to get it to download the correct pdb files. I can easily check if the files are correct because the file size is so much smaller when there is no source.

Machine that is downloading with source System.Web.pdb size is 10,860 KB. Machine that is downloading without source System.Web.pdb size is 843 KB.

Your help in figuring out this issue is greatly appreciated.

Also, please not I have cleared the cache, setup and reset the symbol settings, etc. The files download and do load as symbols, just NO source.

C:\Windows\Microsoft.Net\assembly\GAC_32\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.pdb: Cannot find or open the PDB file.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\System.Web.pdb: Cannot find or open the PDB file.
C:\SymbolCache\MicrosoftPublicSymbols\System.Web.pdb\46C6DCE3C79A4E65A2B1CEF3033C95931\System.Web.pdb: Symbols loaded.
like image 976
Tyler Carver Avatar asked Nov 11 '11 19:11

Tyler Carver


1 Answers

This behavior is often caused by Microsoft publishing updates to the .NET Framework.

When you use Visual Studio 2010's built-in default symbol configuration (by having "Enable .NET Framework source stepping" checked), you effectively query these two servers:

  1. http://referencesource.microsoft.com/symbols
  2. http://msdl.microsoft.com/download/symbols

No. 1 contains source-enabled symbols for the .NET Framework (parts of it at least) and no. 2 contains source-stripped symbols for all Windows.

The problem is that no. 1 is updated not as quickly as no. 2, so when an update arrives through Windows Update, you start getting symbols from no. 2, until someone at Microsoft updates no. 1. It's a pain, but that's how it is.

You can sort-of work around it by deselecting "Enable .NET Framework source stepping" and configuring those paths manually - then you can just disable (or not add at all) no. 2, and at least be informed, that there are no source-enabled symbols available yet.

Or you can disable Windows Update...

like image 169
TripleEmcoder Avatar answered Sep 21 '22 03:09

TripleEmcoder