Groups | Blog | Home
all groups > vb.net > october 2007 >

vb.net : VB.NET XML Documentation Help


Ray75
10/23/2007 4:26:42 PM
Further investigation has revealed that in a "Project" I can go to
properties and select "Generate XML documentation file" as stated here
http://msdn2.microsoft.com/en-us/library/f64ezf9b(VS.80).aspx.
Unfortunately in an asp.net 2.0 website I don't have that.

I then read that the *compilerOptions="doc:<filepath>* option in the
web.config should work, but I get "The compilerOptions attribute is
not declared" while compiling.
Ray75
10/23/2007 6:29:32 PM
Hello,
I've been all over sourceforge, Codplex, Devex, codeproject,
msdn, and the net looking for an answer to both exporting and then
formating the XML comments (''') in my vb code to some sort of
documentation. I've downloaded and failed using nDoc, Snadcastle, and
a couple others except the pricey doc-o-matic.

One site says to simply
* Document your C# source code by using the XML documentation
tags.
* Extract the XML documentation tags to an XML file.
* Tell NDoc where it can find the extracted XML file and the
assembly associated with it-that is the .dll or .exe file.
but I can't even figure out how to extract the XML.

Sorry if I come off abrasive, I just feel very stupid at this
point. If anyone out there in computerland knows what I should be
looking for please let me know.

All I want to do is take something like...
''' <summary>
''' Builds out the URL including the application root, path to
page, and optionally the server name and the Http/Https
''' </summary>
''' <param name="PathFromAppRoot">A string representing the path
starting just after the root path</param>
''' <param name="IsOrgSpecficPage">A boolean value indicating
whether you want the Organization specific path</param>
''' <param name="IncludeServerName">A boolean value indicating if
you want the server name in the string path</param>
''' <param name="UseSSl">A boolean value indicating whether you
want to begin with http or https</param>
''' <returns>The URL with the indicated options</returns>
''' <remarks></remarks>
Public Shared Function BuildUrl(ByVal PathFromAppRoot As String,
Optional ByVal IsOrgSpecficPage As Boolean = False, Optional ByVal
IncludeServerName As Boolean = True, Optional ByVal UseSSl As Boolean
= False) As String

End Sub

and create documentation for all the classes in the project.
Ray75
10/23/2007 8:19:59 PM
Thanks Herfried, but we're setup as a website and not a project and
that option doesn't appear. I have tried compilerOptions=/doc+ and
doc:filename with no luck.

Thanks.
Ray75
10/23/2007 8:22:14 PM
Thanks Herfried, but this is a VS.net website rather than a "project".
I've tried using the compilerOptions=/doc+ and doc:filename option in
the compilation section of my web.config, but with no success and an
error stating that the compilerOptions attribute is not declared.

Thanks!
Herfried K. Wagner [MVP]
10/23/2007 8:43:46 PM
"Ray75" <ray.bowles@gmail.com> schrieb:
[quoted text, click to view]

Somewhere in "My Project" options of your project in the VS IDE there is an
option which, if enabled, causes generation of an XML documentation file
("Generate XML documentation" or similar). This file has the name of the
assembly with an ".xml" extension appended. The XML documentation file can
be used as input for NDOC (which does not support .NET 2.0, BTW), and I
assume it can be used together with Sandcastle (which is the preferred
solution now) too.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Peter Macej
10/24/2007 12:00:00 AM
Generating documentation for Web site isn't the easiest task. You have
probably seen the following posts where some problems were discussed.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1960876&SiteID=1
http://tinyurl.com/2xwn6a

There are also samples of web.config so you can compare them with yours.
Have you created the Web Deployment Project for your Web Site Project?

If you want to save the troubles, you can try our VSdocman (but it's not
free).

--
Peter Macej
Helixoft - http://www.helixoft.com
VSdocman - Commenter and generator of class documentation for C#, VB
AddThis Social Bookmark Button