Solution for Work Item #2967: MrefBuilder /internal+ crashes

Editor
Oct 31, 2008 at 1:52 AM
I took a look at the problem of MRefBuilder failing on obfuscated members with private scope visibility.  The solution is fairly straightforward.  Since the API filter is already stripping out compiler generated members before they even get to the reflection info writing stage, it can be updated to strip out any member without a recognized visibility value as well.  The update only applies to the filter class used when using /internal+ (AllDocumentedFilter).  Just add the code to ignore unrecognized visibilities to the IsExposedMember and IsExposedType methods.  I've attached a patched version of MRefBuilder.exe along with the modified source code file (Source\Reflection\AllDocumentedFilter.cs) to the work item (http://www.codeplex.com/Sandcastle/WorkItem/View.aspx?WorkItemId=2967).  Note that this only ignores the problem items.  All obfuscated members with a recognized visibility will still make it into the reflection information file since they aren't marked in any particular way that would allow automatic exclusion.  However, they can be removed in the normal fashion using the API filter to remove unwanted types and members by name.

If there are any problems or questions, reply here.

Eric