Friday, May 22, 2009

Visual Studio 2008 SP1 + Windows Updates and you can't step through .NET Sources!

Visual Studio 2008 with SP1 is great! Especially for the easiness you can debug and step through .NET Framework sources. I'm not going to insist here about how to configure it, there are a lot of articles out there.

Anyway, the happiness is going to end right after you accept Windows Update's KBs. Microsoft has published the sources of a few .NET Framework versions, but of course, unfortunately they are out of date!

As you can see below they only have published the sources of .NET Framework 3.5 SP1 3053 and an update to 3074.

The big issue is that Windows Update automatically brings you the KB51847 update for .NET Framework 3.5 SP1. What they don't tell you is that they are changing .NET Framework 2.0 version from 2.0.50727.3053 to 2.0.50727.3082 and later after other KBs on 2.0.50727.4016.

This change will break your debug and step through .NET Framework sources availability because Microsoft did not publish the PDB (Program Database) symbol files.
After a week of research and wasted time I ended up writing this article and hopefully will help you not to waste it as well.
Of course, Microsoft did not do anything even if I shout on all the channels at them!

In my case, I could not debug System.Web.dll as the downloaded System.Web.pdb was only 912,384 bytes instead of 10,694,144 bytes, the original with the source code included.

The BIGGEST problem is that you cannot ROLL-BACK to 2.0.50727.3053 anymore!

One way to get around this (until M$ will publish out the correct versions) is to download the VHD image with VS2008 sp1 pre-installed and do your quick step-through .NET Framework source code in there. Of course this method requires you to have Windows Server 2008 with Hyper V.

This is how looks in Visual Studio:

Before Modules
After Modules

Source code

Hey Microsoft, are you sleeping on one ear?

No comments:

Post a Comment

Blog powered up by Blogger