Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Auto-creating documentation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
K Viltersten - 20 Mar 2008 23:17 GMT
Is there a facility in VS Express to
automatically create an API-doc?

I could use the fairly OK Doxygen but
i'd prefer to use something from MS.

--
Regards
Konrad Viltersten
--------------------------------
sleep    - a substitute for coffee for the poor
ambition - lack of sense to be lazy
CyberMan_(MCDST)_nuub - 21 Mar 2008 00:43 GMT
SandCastle - Look for that...

Its the right path

Signature

If I can help, I will.
Do the same for a stranger today.

> Is there a facility in VS Express to
> automatically create an API-doc?
[quoted text clipped - 8 lines]
> sleep    - a substitute for coffee for the poor
> ambition - lack of sense to be lazy
K Viltersten - 21 Mar 2008 02:36 GMT
> SandCastle - Look for that...
>
> Its the right path

I've received a number of suggestions mentioning
numerous solutions. None of them is a functionality
built-in for VS. That's surprising...

I though some HTML or XML would be created
during the process of compiling...

--
Regards
Konrad Viltersten
--------------------------------
sleep    - a substitute for coffee for the poor
ambition - lack of sense to be lazy
Gilles Kohl [MVP] - 21 Mar 2008 07:59 GMT
>> SandCastle - Look for that...
>>
[quoted text clipped - 3 lines]
>numerous solutions. None of them is a functionality
>built-in for VS. That's surprising...

If memory serves, there used to be built-in functionality to generate HTML
help in VS2003, but that has been dropped in 2005, and did not come back.

>I though some HTML or XML would be created
>during the process of compiling...

Well XML is indeed created - right-click your project and select Properties,
then go the Build tab. There, check "[x] XML documentation file".

An XML file with your comments (*) will be generated, but that is as far as it
goes, as far as I know.

It still makes sense to enable this IMHO, for two reasons:

- Intellisense - when e.g. calling a method of your own, you'll get your own
descriptions for what it does, for each parameter, for the return value ...

- Warnings - for each public element without a comment, you'll be reminded to
write one.

  Regards,
  Gilles.

(*): Enter a triple slash above a member (e.g. a method) in Visual Studio to
see how this works. See "XML Documentation" in help for more info.
K Viltersten - 21 Mar 2008 09:33 GMT
>>I've received a number of suggestions mentioning
>>numerous solutions. None of them is a functionality
[quoted text clipped - 3 lines]
> functionality to generate HTML help in VS2003, but
> that has been dropped in 2005, and did not come back.

Too bad...

>>I though some HTML or XML would be created
>>during the process of compiling...
[quoted text clipped - 4 lines]
> An XML file with your comments (*) will be generated,
> but that is as far as it goes, as far as I know.

Perhaps i'm doing something wrong but the only
contents in the XML file i get is this.

 <?xml version="1.0" ?>
- <doc>
- <assembly>
 <name>TheCoolestProjectEver</name>
 </assembly>
 <members />
 </doc>

The project consists of several classes and a number
of methods, so i was expecting the XML file to be
more... hmmm... larger.

--
Regards
Konrad Viltersten
--------------------------------
sleep    - a substitute for coffee for the poor
ambition - lack of sense to be lazy
Jon Skeet [C# MVP] - 21 Mar 2008 09:44 GMT
<snip>

> Perhaps i'm doing something wrong but the only
> contents in the XML file i get is this.
[quoted text clipped - 10 lines]
> of methods, so i was expecting the XML file to be
> more... hmmm... larger.

Do your types and methods have XML documentation defined for them
though? And are they public types/methods? I don't think documentation
is generated for non-public types, although I could be wrong.

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

K Viltersten - 21 Mar 2008 12:04 GMT
> <snip>
>
[quoted text clipped - 18 lines]
> generated for non-public types, although I could
> be wrong.

I miss JavaDocs...   :)

Thanks to all. I'll try to get REALLY annoyed
and write one on my own.   :)

--
Regards
Konrad Viltersten
--------------------------------
sleep    - a substitute for coffee for the poor
ambition - lack of sense to be lazy
Andy - 21 Mar 2008 15:01 GMT
> > <snip>
>
[quoted text clipped - 30 lines]
> sleep    - a substitute for coffee for the poor
> ambition - lack of sense to be lazy

you should have xml comments in your source..

/// <summary>Converts a string to an int.</summary>
/// <param name="strVal">The <see cref="System.String"/> value to
convert.</param>
/// <returns>An <see cref="Int32"/>.</returns>
public int MyFunction( string strVal ) {
}
Andy - 21 Mar 2008 15:02 GMT
> > <snip>
>
[quoted text clipped - 30 lines]
> sleep    - a substitute for coffee for the poor
> ambition - lack of sense to be lazy

Oh.. sorry.  Then you need to turn on Generate xml comments, as
someone already described, and use SandCastle to convert your .xml
file into whatever you need...

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.