Broken Intellisense for users of my API

  • Thread starter Thread starter notayoda
  • Start date Start date
N

notayoda

Hi All,

I have created an API in C# for developers to use at my workplace, and have
commented it fully. If I reference the DLL in a new class in my API
project, I get full intellisense on the methods, descriptions and
everything.

If I make a new project and include my API DLL, I do get Intellisense popus,
but they are missing the descriptions I created. ( I see only the method
signatures)

Ideas? Thanks in advance...
 
notayoda,

When you compile your DLL, you should make sure that you have the
project setting to generate XML documentation set. When you do this, it
will generate a file with an XML extension that has the name of your output
file (minus the DLL extension).

When referencing your assembly, if that XML file is in the same
directory, then Intellisense will pick up the comments, and display them in
the editor.

Hope this helps.
 
notayoda said:
I have created an API in C# for developers to use at my workplace, and have
commented it fully. If I reference the DLL in a new class in my API
project, I get full intellisense on the methods, descriptions and
everything.

If I make a new project and include my API DLL, I do get Intellisense popus,
but they are missing the descriptions I created. ( I see only the method
signatures)

Ideas? Thanks in advance...

You need to also build the XML documentation file (specify it in the
project build configuration) and make sure it's got the same name as
the assembly (but with a .xml extension instead of .dll). Ship it to
your users along with the assembly.
 
Yep, that did the trick! Thanks!

Project Properties ->Configuration Properties->Build
Outputs
XML Documentation file (type in name of your DLL here)
When you build this will create an XML file along with your DLL.

To use your DLL with comments enabled in a new project, reference the DLL in
the project and make sure that you have this xml file in the same folder as
the referenced DLL.



Nicholas Paldino said:
notayoda,

When you compile your DLL, you should make sure that you have the
project setting to generate XML documentation set. When you do this, it
will generate a file with an XML extension that has the name of your
output file (minus the DLL extension).

When referencing your assembly, if that XML file is in the same
directory, then Intellisense will pick up the comments, and display them
in the editor.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

notayoda said:
Hi All,

I have created an API in C# for developers to use at my workplace, and
have commented it fully. If I reference the DLL in a new class in my API
project, I get full intellisense on the methods, descriptions and
everything.

If I make a new project and include my API DLL, I do get Intellisense
popus, but they are missing the descriptions I created. ( I see only the
method signatures)

Ideas? Thanks in advance...
 
Back
Top