Creating an Assembly

The following steps are provided as a guide to creating an assembly with XML comments, which can be used to create an XML documentation file. The assembly XML documentation file for this tutorial has already been created and is available in the C:\Program Files\ComponentOne\DocToHelp\Tutorial\BarCode\BarCode Assembly\Original folder.

Steps are provided for both Visual Studio 2002/2003 and Visual Studio 2005.

Using Visual Studio 2002/2003

 

1.   Open Visual Studio and select File|New|Blank Solution. The New Project dialog box appears.

2.   Under Project Types, select Visual C# Projects.

3.   Under Templates, select ClassLibrary.

4.   Enter C1BarCode in the Name textbox.

5.   Choose a location and click OK.

6.   Select Project|C1BarCode Properties. The Property Pages dialog box appears.

7.   Under the Common Properties folder in the left pane, select General.

8.   In the right pane, enter C1.Win.C1BarCode in the Assembly Name textbox. Notice the Output Type property is already set to Class Library.

9.   Enter C1.Win.C1BarCode in the Default Namespace property and click OK to close the property pages.

10.  Add the following code, which was taken from the C1BarCode assembly, to the Class1.cs.

namespace C1.Win.C1BarCode
{
    /// <summary>
    ///
Specifies the type of barcode to be generated by the C1BarCode control.
   
/// </summary>
    ///
<remarks>
    ///
The CodeTypeEnum enumeration represents the different types of barcode that can
   
/// be generated by the C1BarCode control. Some types can be used to represent
    
/// alphanumeric values, others can only represent numeric values.
   
/// </remarks>
   
public enum CodeTypeEnum
    {
   /// <summary>
   /// Code 39 is an alpha-numeric encoding also known as 3 of 9 and LOGMARS.
   /// This was the first alphanumeric symbology developed, and is one of the
   /// most widely used encodings.
   /// </summary>
   Code39,

   /// <summary>
   /// Code 93 is an alpha-numeric encoding that is slightly denser than code 39.
   /// </summary>
   Code93,

   /// <summary>

   /// Code 128 is a very high density alpha-numeric bar code. It will use the

   /// least amount of space of any current 1-D symbology for symbols with 6

   /// characters or more.

   /// </summary>

   Code128,     

    }
}

11.  Run and save your project. The assembly is created and can be used to generate an XML documentation file.

Using Visual Studio 2005

 

1.   Open Visual Studio and select File|New Project. The New Project dialog box appears.

2.   Under Project types|Other Languages, select Visual C#.

3.   Under Templates, select ClassLibrary.

4.   Enter C1BarCode in the Name text box and click OK.

5.   Select Project|C1BarCode Properties. The Property Pages dialog box appears, and the Application tab is selected.

6.   On the Application tab, enter C1.Win.C1BarCode in the Assembly Name textbox. Notice the Output Type property is already set to Class Library.

7.   Enter C1.Win.C1BarCode in the Default Namespace.

8.   Add the following code to the Class1.cs, which was taken from the C1BarCode assembly.

namespace C1.Win.C1BarCode
{
    /// <summary>
    ///
Specifies the type of barcode to be generated by the C1BarCode control.
   
/// </summary>
    ///
<remarks>
    ///
The CodeTypeEnum enumeration represents the different types of barcode that can
   
/// be generated by the C1BarCode control. Some types can be used to represent
   
/// alphanumeric values, others can only represent numeric values.
   
/// </remarks>
   
public enum CodeTypeEnum
    {
   /// <summary>
   /// Code 39 is an alpha-numeric encoding also known as 3 of 9 and LOGMARS.
   /// This was the first alphanumeric symbology developed, and is one of the
   /// most widely used encodings.
   /// </summary>
   Code39,

   /// <summary>
   /// Code 93 is an alpha-numeric encoding that is slightly denser than code 39.
   /// </summary>
   Code93,

   /// <summary>

   /// Code 128 is a very high density alpha-numeric bar code. It will use the

   /// least amount of space of any current 1-D symbology for symbols with 6

   /// characters or more.

   /// </summary>

   Code128,     

    }
}

9.   Run and save your project. The assembly is created and can be used to generate an XML documentation file.