reflection.org file missing classes

Aug 27, 2008 at 4:11 PM
I'm pretty new to C# and just recently found out about Sandcastle.
I have a simple application that is made up of a form, myform.cs, and a static class that handles connection/communication with a SQL database.
I have compiled both of these together into one output file, myApp.exe. I have Visual Studio 2008 kick out the comments xml file for me. If I look through this file, I can see all my /// comments I placed in my code on the two classes and their public properties/methods.
The form only has one public method, the constructor. The helper class that does the database communication has several public methods that the form calls depending on which button is pressed.
Anyway, when I run through the steps to build the CHM file, I only get information about my form class, which is not very useful since it only has a constructor and then all the other inherited behavior from form, container, etc.
For some reason I don't get anything about my static helper class. Trying to dig into this a bit I noticed that when I build the reflection.org file by running MRefBuilder on MyApp.exe, I only get output about the form, not the helper class. So I think the problem is starting there.
Am I missing something or do I just not know how to program? My application seems to work just fine, but that doesn't mean I used the best design. I have searched the web for the answer for the past day and a half with no luck. I tried using Sandcastle Help File Builder and DocProject but I'm getting the same results. It's not really critical for this small application that I get this working but it will be for the next several that I build so I would like to get this resolved if possible.
I'd appreciate any feedback, I can really use all the help I can get.

Versions of software I have been using:
Sandcastle: Version 2.4.10520
HTML Help Workshop: 4.74.8702.0
SHFB: 1.7.0.0
DocProject: 1.2.0.0
Editor
Aug 27, 2008 at 4:24 PM

Did you put your classes in a namespace?  SHFB will exclude the global namespace by default.  That's where classes without a namespace will go.  You can use the Namespaces button to the right of the list of assemblies on the main form to edit the namespaces that are included.  You can put a checkmark next to the "(global)" entry to include it.  The other solution is to add a namespace around the class in your code:

namespace SomeNamespace

{

    public class SomeClass
    {
    }

}

Eric

 

Aug 27, 2008 at 4:36 PM
Eric,

   Thanks for you quick response. Yes I have both the form and the helper class files in the same namespace, I double checked. Just to be complete, I added the "global" namespace in SHFB and regenerated the CHM file. Still I don't have any information about the helper class file.
   I can post some code snippets if that would help.
Thanks,

Bryan
  
Aug 27, 2008 at 5:15 PM
Here are some code snippets from my application...

FabWaypointApp.cs
namespace FabWaypointApp {
   static class FabWaypointApp {
      /// <summary>
      /// The main entry point for the applicaiton.
     /// </summary>
     [STAThread]
     static void Main() {
        ...
        Application.Run(new frmFabWaypointTerminal();
     }
   }
}

FWTui.cs
namespace FabWaypointApp {
  public partial class frmFabWaypointTerminal:Form {
     ...
     ///<summary>
    /// Initializes all GUI components and gets current list of active sampleID's from FWTLL to populate the drop-down.
    /// </summary>
     public frmFabWaypointTerminal() {
        InitializeComponent();
        UpdateSampleIDs();
     }
     ...
    private void UpdateSampleIDs() {
       cbxSampleID.Items.AddRange(FWTLL.GetActiveRuns());
    }
   ...
   }
}

FWTLL.cs
namespace FabWaypointApp {
  /// <summary>
  /// This class handles all interactions with the database.
  /// </summary>
  static class FWTLL {

    /// <summary>
    /// Enum to keep trak of the status of the run.
    /// </summary>
    public enum RunStatus {NotStarted, Started, Finished, Failed}
    ...
    /// <summary>
    /// Queries the database to get a list of all active runs and puts the SampleIS from each into a string array.
    /// </summary>
    /// <returns> array of SampleID's for every active run in the database.</returns>
    /// <exception cref="ApplicationException">Thrown if connection to the database or the query is unsuccessful</exception>
    public static string[] GetActiveRuns() {
       ...
    }
  }
}

The behavior I'm getting is that in the CHM I get all the info for frmFabWaypointTerminal but nothing for FWTLL. I hope this makes sense and is helpful.
Aug 27, 2008 at 7:43 PM
Edited Aug 27, 2008 at 7:45 PM
Hi Bryan,

The problem is most likely that your static class is not marked as public.  The MRefBuilder requires the /internal+ switch to document non-public APIs.

In both SHFB and DocProject there are project options that allow you to change the scope of the documentation to include non-public APIs if you wish to keep the class as internal (the default class accessibility modifier in C#).

- Dave
Aug 27, 2008 at 8:24 PM
Dave,

   You were exactly correct. Thank you so much for pointing that out! I don't think I would have ever caught that. I really appreciate it.

Bryan