Xml comments in intellisense tooltip for dotnet 2.0 assembly

In VS.NET, IntelliSense shows the documentation for [almost] every
system-defined class/method/param. For example: when I'm writing a call to a
method, I see a description of every parameter in a nice tooltip.

I defined a C# class and documented it with XML comments. When I use this
class from code in the *same project*, IntelliSense works fine, and shows my
my XML comments in the tooltips.

But: when I reference the assembly containing my class in another project,
bye-bye XML comments: they just don't show up in the tooltips.

Why? I think I know: it is because the XML comments are not compiled into
the resulting assembly, so they are simply not available to the project
referencing the assembly.

But then: why and how does IntelliSense know what to show in the tooltips
for system classes? (like FileStream, for instance).

How can I build an assembly that, when used by a 3rd party, will be able to
show comments into IntelliSense's tooltips?
SwamyNAsked:
Who is Participating?
 
philipjonathanConnect With a Mentor Commented:
I don't think that can be done
0
 
philipjonathanCommented:
1. Open your project properties by choosing from the menu: Project -> YourProjectName Properties...
2. On the left panel, browse to Configuration Properties -> Build
3. Under the "Outputs" section, enter the documentation file name into "XML Documentation File". Eg. "bin\Debug\YourDllName.dll.xml"

ps. Make sure that the file resides in the same path as your dll.
0
 
philipjonathanCommented:
I assume you are already using XML comments, aren't you? If not, just try typing "///" above a class or method declaration.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
SwamyNAuthor Commented:
actually, i am able to generate xml documentation file.
but if i want my dll to be consumed on some other system/ project, i don't get the xml comments in tooltip of intellisense.

i know that xml file is required at same location where the dll is deployed/used from.

but i want that the xml documentation file be embedded with the dll ( assembly) so that i can pass on only the dll ( single file & not the xml file).
0
 
philipjonathanCommented:
Any example of other people managed to do so?
0
 
SwamyNAuthor Commented:
i am asking for the solution, that how to achieve.
i don't have any example.
0
 
SwamyNAuthor Commented:
ok
0
 
philipjonathanCommented:
Objection.

I believe my comment has answered the original question correctly ID:21872390.
As for the follow up question, I believe "no" is the answer, as I commented in ID:21876545

Please kindly re-consider to accept those 2 comments as the answers.
0
All Courses

From novice to tech pro — start learning today.