XML documentation 
Author Message
 XML documentation

Hi folks.

I've commented all my public methods/properties/etc with the <summary> and
<param> stuff, and compiled with /doc. The XML documentation file has been
generated. This is for a DLL that contains components people can use in
their .NET projects. When someone uses a property or method, I want
Intellisense to displays the XML documentation I wrote for the methods, just
like it does for inherent .NET methods.

Example:

If, in my DLL, I have this:

namespace Nate
{
    public class MyClass
    {
        private MyClass()
        {
        }

        /// <summary>
        /// Does something useful.
        /// </summary>
        /// <param name="paramArgument>A useful parameter.</param>
        public static void DoSomething(int paramArgument)
        {
            [...]
        }
    }

Quote:
}

then how do I get those XML comments to appear when, in another project,
someone referencing and using my DLL types:

using Nate;

namespace MyApp
{
    public class Foo
    {
        public Foo()
        {
            MyClass.DoSomething(
        }
    }

Quote:
}

After the user presses the '(', Intellisense will display the method and
parameter info in the yellow tooltip. Problem is, I can't figure out how I
can link the documentation into the DLL so that it does this! Please help!

Nate



Wed, 30 Jun 2004 02:29:24 GMT  
 XML documentation
Nathan,
    If the documentation file is in the same directory as the dll it will be
seen by Intellisense.  It also needs to have the same name as the dll with
just the extension different.  I just have the IDE place the xml file in the
same directory (and switch the path when I go to release mode).


Quote:
> Hi folks.

> I've commented all my public methods/properties/etc with the <summary> and
> <param> stuff, and compiled with /doc. The XML documentation file has been
> generated. This is for a DLL that contains components people can use in
> their .NET projects. When someone uses a property or method, I want
> Intellisense to displays the XML documentation I wrote for the methods,
just
> like it does for inherent .NET methods.

> Example:

> If, in my DLL, I have this:

> namespace Nate
> {
>     public class MyClass
>     {
>         private MyClass()
>         {
>         }

>         /// <summary>
>         /// Does something useful.
>         /// </summary>
>         /// <param name="paramArgument>A useful parameter.</param>
>         public static void DoSomething(int paramArgument)
>         {
>             [...]
>         }
>     }
> }

> then how do I get those XML comments to appear when, in another project,
> someone referencing and using my DLL types:

> using Nate;

> namespace MyApp
> {
>     public class Foo
>     {
>         public Foo()
>         {
>             MyClass.DoSomething(
>         }
>     }
> }

> After the user presses the '(', Intellisense will display the method and
> parameter info in the yellow tooltip. Problem is, I can't figure out how I
> can link the documentation into the DLL so that it does this! Please help!

> Nate



Wed, 30 Jun 2004 03:23:25 GMT  
 XML documentation
Nathan,

    In order for VS.NET to pick up your documentation, the file that is
generated along with your assembly needs to be placed in the same directory
that the assembly resides in.

    Hope this helps.

--
                              - Nicholas Paldino [.NET MVP]


Quote:
> Hi folks.

> I've commented all my public methods/properties/etc with the <summary> and
> <param> stuff, and compiled with /doc. The XML documentation file has been
> generated. This is for a DLL that contains components people can use in
> their .NET projects. When someone uses a property or method, I want
> Intellisense to displays the XML documentation I wrote for the methods,
just
> like it does for inherent .NET methods.

> Example:

> If, in my DLL, I have this:

> namespace Nate
> {
>     public class MyClass
>     {
>         private MyClass()
>         {
>         }

>         /// <summary>
>         /// Does something useful.
>         /// </summary>
>         /// <param name="paramArgument>A useful parameter.</param>
>         public static void DoSomething(int paramArgument)
>         {
>             [...]
>         }
>     }
> }

> then how do I get those XML comments to appear when, in another project,
> someone referencing and using my DLL types:

> using Nate;

> namespace MyApp
> {
>     public class Foo
>     {
>         public Foo()
>         {
>             MyClass.DoSomething(
>         }
>     }
> }

> After the user presses the '(', Intellisense will display the method and
> parameter info in the yellow tooltip. Problem is, I can't figure out how I
> can link the documentation into the DLL so that it does this! Please help!

> Nate



Wed, 30 Jun 2004 03:27:47 GMT  
 XML documentation
Thanks for the info guys.

Nate


Quote:
> Hi folks.

> I've commented all my public methods/properties/etc with the <summary> and
> <param> stuff, and compiled with /doc. The XML documentation file has been
> generated. This is for a DLL that contains components people can use in
> their .NET projects. When someone uses a property or method, I want
> Intellisense to displays the XML documentation I wrote for the methods,
just
> like it does for inherent .NET methods.

> Example:

> If, in my DLL, I have this:

> namespace Nate
> {
>     public class MyClass
>     {
>         private MyClass()
>         {
>         }

>         /// <summary>
>         /// Does something useful.
>         /// </summary>
>         /// <param name="paramArgument>A useful parameter.</param>
>         public static void DoSomething(int paramArgument)
>         {
>             [...]
>         }
>     }
> }

> then how do I get those XML comments to appear when, in another project,
> someone referencing and using my DLL types:

> using Nate;

> namespace MyApp
> {
>     public class Foo
>     {
>         public Foo()
>         {
>             MyClass.DoSomething(
>         }
>     }
> }

> After the user presses the '(', Intellisense will display the method and
> parameter info in the yellow tooltip. Problem is, I can't figure out how I
> can link the documentation into the DLL so that it does this! Please help!

> Nate



Wed, 30 Jun 2004 03:40:55 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting XML documentation to appear in assembly

2. XML Documentation in MC++?

3. Using XML documentation in Managed C++

4. Sample xslt to convert xml documentation to html pages

5. Embeded XML Documentation

6. XML documentation problems

7. Preserving XML Documentation when compiling DLL

8. XML documentation

9. Extending XML Documentation

10. XML Documentation

11. XML Documentation Tags for C#

12. XML Documentation

 

 
Powered by phpBB® Forum Software