Autogenerating documentation from the c# source code comments

R

Robert

Hi, I am wanting to automatically generate my documentation from my C# code
comments. Specifically I am wanting to generate examples that look like this

http://msdn.microsoft.com/en-us/library/ch45axte.aspx

where code examples are shown for VB.NET, C#. C++, F# and JScript

How do you do this and can you do this with VS2010 Pro. I have searched and
cannot find a website telling me how to do this. I would prefer to include a
C# example in my source code comments and have the code generation tool
generate from this the examples in VB.Net, C++, F# and JScript examples
automatically.

Is this a technology that is available and do you C# developers use it. What
tools would you recommend

Thank you
Robert
 
A

Anja Länge

Robert said:
Hi, I am wanting to automatically generate my documentation from my
C# code comments. Specifically I am wanting to generate examples that
look like this

http://msdn.microsoft.com/en-us/library/ch45axte.aspx

where code examples are shown for VB.NET, C#. C++, F# and JScript

Take a look at

[Sandcastle - Documentation Compiler for Managed Class]
http://sandcastle.codeplex.com/

and the GUI
[Sandcastle Help File Builder]
http://shfb.codeplex.com/

Sandcastle uses reflection to find types and members in the assemblies and
looks for them in the xml-output of your VS project to build the
documentation.

I read an article that CruisControl.NET can be scripted to do this during
normal compilation, but I never checked this.

HTH
Anja
 
R

Robert

Hello Peter
Do your comments already include code examples?

Yes, but only for C#. I want the autohelp generation tool to automatically
generate the example help for other languages from my C# like in the URL. It
seems unreasonable that I should have to generate it for all the languages
when automated conversion seems like something like the help tool should do.

Do you think Microsoft handcraft the examples in their online help for all
languages by hand. I don't think they do. The reason I write this is that
most of the MSDN examples they had were C# and VB.Net and C++. Then overnight
a lot of F# examples appeared. It would have taken them quite a while to
retrospectively do this so I expect they just ran a tool on their code and
had their autogenerated help updated. I guess what I am wanting is to
generate C# example code in my source code and have the C++ and F# example
code autoconverted. At the moment I don't have C++ and F# skills but people
that use my API might have so I want my example usage in those languages too.

I hope this makes sense and thank you for your answer.

Robert W
 
A

Arne Vajhøj

Hi, I am wanting to automatically generate my documentation from my C# code
comments. Specifically I am wanting to generate examples that look like this

http://msdn.microsoft.com/en-us/library/ch45axte.aspx

where code examples are shown for VB.NET, C#. C++, F# and JScript

How do you do this and can you do this with VS2010 Pro. I have searched and
cannot find a website telling me how to do this. I would prefer to include a
C# example in my source code comments and have the code generation tool
generate from this the examples in VB.Net, C++, F# and JScript examples
automatically.

Is this a technology that is available and do you C# developers use it. What
tools would you recommend

I have never heard of a doc generating tool with integrated
langauge translation.

So my guess is that MS actually handwrite each language example.

If you are willing to spend time creating such a tool, then
you can try and merge some open source code from NDoc and
a language converter like the one in SharpDevelop.

It should be possible, but a lot of work.

Arne
 

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