XML Comment tags don't work in my program


G

Guest

XML Comment tags (except summary, remarks, param and returns) don't work in my small trial program. The comment tags i want to work are see, seealso, exception, etc. But none of them work. I tried some code from net but no help. Do i have to do some extra settings in the project to make them work. please help.
Please check the code below. I don't think i have done any mistakes. Using this code, i build Comment Web Pages and was not able to see the seealso with link and exceptions. please help me.

using System;

namespace Comments
{
/// <summary>
/// This is a HelloUniverse class
/// </summary>
public class HelloUniverse
{
/// <summary>
/// Default Constructor
/// </summary>
public HelloUniverse()
{
}

/// <summary>
/// This is a base method
/// </summary>
/// <param name="intParamOne">Input Parameter One</param>
/// <returns>Return Paramter</returns>
public bool BaseMethod(int intParamOne)
{
return true;
}
}

/// <summary>
/// This is a HelloWorld class.
/// </summary>
/// <remarks>
/// Additional Info.
/// </remarks>
/// <seealso cref="HelloUniverse"/>
public class HelloWorld : HelloUniverse
{
/// <summary>
/// This is a field.
/// </summary>
bool bCheckThis;

/// <summary>
/// Default Constructor
/// </summary>
public HelloWorld()
{
}

/// <summary>
/// One Argument Constructor
/// </summary>
/// <param name="strParamOne">Input Parameter One</param>
public HelloWorld(string strParamOne)
{
}

/// <summary>
/// This is a property.
/// </summary>
/// <value>Holds a boolean value.</value>
/// <remarks>
/// Remarks for property.
/// </remarks>
public bool PropertyOne
{
set{bCheckThis = value;}
get{return bCheckThis;}
}

/// <summary>
/// This is a method with input parameters.
/// </summary>
/// <param name="strParamOne">Input Parameter One</param>
/// <param name="intParamTwo">Input Parameter Two</param>
/// <exception cref="System.Exception">Returns an exception</exception>
public void MethodOne(string strParamOne, int intParamTwo)
{
throw new Exception("Hello World");
}

/// <summary>
/// This is a method with return value.<see cref="MethodOne"/>
/// </summary>
/// <param name="strParamOne">Input Parameter One</param>
/// <returns>Return Parameter</returns>
/// <seealso cref="HelloWorld.MethodOne"/>
public bool MethodTwo(string strParamOne)
{
return true;
}
}
}
Thanx in advance,
faktujaa
 
Ad

Advertisements

G

Guest

Presumably you're referring to generating the comment web pages from the tools menu
Yes, they seems only to process a small number of XML tags

A way around that could be to generate the xml documentation file, from project properties, configuration properties, build, Xml Documentation File - set it to whatever you want, like TestProject.xml

Then you'd need to write a bit of xsl to process the above document, and give you your documentation

Hope that's of use to you....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top