Click here to monitor SSC

Bart

Software Engineer - Red Gate Software

.NET Reflector Support: Is it possible to see XML documentation for members and types?

Published Thursday, July 30, 2009 5:00 PM

Yes, as long as you have the XML documentation file for the assembly.

If the assembly is yours, you just need to make sure you generate the XML documentation file as part of your build process. Many third party code providers will also supply an XML documentation file for each of their assemblies, so you simply need to make sure these are stored alongside the relevant assemblies. .NET Reflector can also display the API documentation for most of the framework class libraries, but you don't need to worry about finding the XML files for these.

Having verified that you have the relevant XML files, you now need to ensure that documentation display is enabled in .NET Reflector. Go to View > Options on the main menu bar, then click Disassembler in the list on the left. Now select Formatted from the Documentation drop-down. If you select XML Comments or None, no documentation will be displayed, although in the case of the former, this is probably a bug. Now click OK.

To view documentation for any type or member you need to make sure the Disassembler window is open. To do this just right-click on the type or member, then click Disassemble in the context menu. If the member has associated documentation, it will be displayed in a panel underneath the disassembler output or decompiled source code.

Note that we have had occasional reports of XML documentation support for the framework class libraries not working. If this applies to you the following information, and associated workaround, may prove useful.

If the XML documentation files for framework assemblies are stored only in culture specific directories below their associated assemblies, rather than alongside the assemblies, .NET Reflector may not be able to pick them up automatically.

For example,

mscorlib.dll is in C:\Windows\Microsoft.NET\Framework\v2.0.50727

but

mscorlib.xml is in C:\Windows\Microsoft.NET\Framework\v2.0.50727\en

To fix this, copy the XML documentation files from C:\Windows\Microsoft.NET\Framework\v2.0.50727\en into C:\Windows\Microsoft.NET\Framework\v2.0.50727. You should find that XML documentation for the framework assemblies will now be displayed in .NET Reflector, as expected.

We will aim to get this bug fixed in the next major release of .NET Reflector.

by Bart Read
Filed Under: , ,

Comments

No Comments
You need to sign in to comment on this blog

About Bart Read

Bart has done many things since he started work at Red Gate Software Ltd in August 2004, but nowadays he's (mainly) the product manager for the .NET Developer Tools. He still feels like this is a bit like admitting you were cheering for the Empire whilst watching Star Wars, but for now he's along for the ride. In a previous incarnation he was a project manager leading the .NET Reflector Pro, ANTS Memory Profiler 5, ANTS Performance Profiler 4 & 5, and SQL Prompt 3.0 - 3.6 projects. He still occasionally writes some code and, in the past, has touched the code for most of the Red Gate SQL developer tools... some of them still haven't recovered from the shock. He was born and grew up in Dorset, was educated in Nottingham and London, and likes music and real ale. His photo is extremely misleading.
<July 2009>
SuMoTuWeThFrSa
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678
How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. Wesley David... Read more...

Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across and started getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...