What's Hot

Get Source for the Framework

Microsoft's releasing some .NET 3.5 Framework swag: deployment guidelines and the source code itself.

Microsoft has released two guidelines for the deployment of the .NET 3.5 Framework: one for application developers and one for administrators. The developers guide includes details for determining what version of the Framework is installed and information on installer error codes and command-line switches. You can choose to chain the dotNetFx35Setup.exe (2.7MB) with the /q /norestart switches as part of your install, and the dotnet setup will check for the relevant bits and download them if necessary. Alternatively you can chain the full dotNetFX35.exe and avoid downloading from the Internet; the catch is that the dotNetFX35.exe is 197MB to distribute.

The guide also provides details on extracting the modules out of the dotNetFx35.exe, so you can distribute the most common ones along with the dotNetFx35Setup.exe. The setup program will check for modules in its path and download only missing modules from the Web if needed. You can download the dotNetFx35Setup.exe here and find the full distribution (dotNetFx35.exe) on the same page. The administrator's guide provides details on running network installs of the Framework, including Active Directory. The guide also provides a sample script.

The exciting news for the month is Microsoft has also begun to provide the source code for the .NET Framework for debugging purposes. You can step through your code and into the Framework code, which comes complete with extensive comments. Only some of the libraries have been released at present: Mscorlib.dll, System.dll, System.Data.dll, System.Drawing.dll, System.Web.dll, System.Web.Extensions.dll, System.Windows.Forms.dll, System.XML.dll, UI-Automation*.dll, System.Windows.dll, System.Printing.dll, System.Speech.dll, WindowsBase.dll, WindowsFormsIntegration.dll, Presentation*.dll, and Microsoft.VisualBasic.dll.

To use the source code, you need to turn off "Enable Just My Code" and turn on "Enable Source Server Support" in Visual Studio's Options under Debugging – General. Next, go to the Debugging – Symbols panel, add the symbol source location of http://referencesource.microsoft.com/symbols, and provide a local cache path to save the symbols in.

Microsoft's general recommendation is that you check "search the above locations only when symbols are manually loaded." This means you won't step into the .NET Framework code until you load the symbols for the library in question. You can right click on the library in the "Modules" window and choose "load symbols." If you get prompted for a path for the symbols file, that means the library isn't available from the source code server.

You probably won't want to step into the Framework code all the time; this can be a tedious task to see just how many calls occur below your code. But when you're having trouble with one part of your application or are unsure about the ramifications of a Framework call, then the source code with comments can be a great help.

You can find more information on configuring Visual Studio to debug the .NET Framework source here.

About the Author

Bill McCarthy is an independent consultant based in Australia and is one of the foremost .NET language experts specializing in Visual Basic. He has been a Microsoft MVP for VB for the last nine years and sat in on internal development reviews with the Visual Basic team for the last five years where he helped to steer the language’s future direction. These days he writes his thoughts about language direction on his blog at http://msmvps.com/bill.

comments powered by Disqus

Featured

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

  • What's New for Python, Java in Visual Studio Code

    Microsoft announced March 2024 updates to its Python and Java extensions for Visual Studio Code, the open source-based, cross-platform code editor that has repeatedly been named the No. 1 tool in major development surveys.

Subscribe on YouTube