This project has moved and is read-only. For the latest updates, please go here.

XML Documentation from Entity Framework Partial Classes

Topics: Developer Forum, User Forum
Apr 13, 2010 at 6:00 AM

It looks like I am having the following issue, but I'm not sure if there is something I'm doing wrong, something that can be worked around, something fundamental or something that could be enhanced as the base cause of the issue I'm seeing.

I have a number of classes created via the Entity Framework (v4.0).  I then have a number of partial classes that extend those entity framework objects (with methods and some read-only public properties).  When I go to create the documentation using SHFB it appears to ignore these partial classes.  It has the properties of the base entity framework objects (and it looks like I can have documentation of them using the .emdx file), but none of the partial classes methods (which all have triple slash comments) show up in the documentation generated (the method itself doesn't even show up).

Any ideas on what is happening here?  Anything I'm doing wrong/any work around that I can employ to get this to work?

Apr 14, 2010 at 2:58 AM

Are the missing members private or internal?  If so, they won't show up unless the DocumentPrivates and/or DocumentInternals properties are set to true.  Unimplemented partial methods wouldn't show up at all since they wouldn't end up in the compiled assembly.  If neither is the case and you can send me a small example that I can compile I'll take a look at it.  My e-mail address is in the About box in the GUI and in the footer of the pages in the help file.



Apr 19, 2010 at 1:18 AM

In attempting to make a small sample solution to send you I am unable to re-create this issue.  The sample solution I created works as expected, so there must be some issue with the solution I was working with that non-standard or incorrect for some reason.  Thanks for you time/interest in this issue, but it does look like it works correctly.  If I do determine why it was behaving differently I will post that here for reference.

Jun 2, 2010 at 8:19 PM

I'm having the same issue - nothing within my partial classes is being generated. This only occurs if the partial class has two partials. For instance, MyClass.Generated.cs will correctly be generated in the help file but if I add a MyClass.cs (partial), then no methods in either portion show up in the generated help file. If I browse my assemblies in the ApiFilter window, the double-partial classes show no members/methods.

Jun 2, 2010 at 8:30 PM
Edited Jun 2, 2010 at 8:30 PM

There is a known issue where if your code uses certain generic types or delegates, the current version of MRefBuilder will remove all members from the class in .NET 4.0 assemblies.  It could be that you are running into that issue.  It is reportedly fixed in the next release of Sandcastle due out soon.



Jun 2, 2010 at 8:35 PM

It will remove ALL members from the entire class or just those which use the unallowed generic types or delegates? For instance, I have the following method in a partial, no documentation is generated for any member or method of the class (except for the base class (object) methods):

/// <summary>This is a test method.</summary>
public void TestMethod()
    //It won't show up in the help file!

Thanks for your help!

Jun 2, 2010 at 9:25 PM

As I recall, it removes all members.  All you get are the basic inherited members.