This project has moved and is read-only. For the latest updates, please go here.

How i get XML file for asp .net 2.0 pages ???

Topics: Developer Forum
Mar 15, 2007 at 10:45 PM
To document, Help FIle builder need an dll and xml file, but how can i get this xml file for an asp .net 2.0 project
Mar 16, 2007 at 3:11 AM
In VS2005 SP1, you can create a web application rather than a website. This will generate a single DLL for the application like VS2003 did. For a website, I think all you can do is add all of the generated assemblies and use the same XML comments file if you're able to get it to generate one.

Mar 19, 2007 at 8:13 PM
Probably seen this before but if you add this to your web.config file just above the closing /configuration:
<!-- this is added to force the compiler to export the xlm code. Also Option strict is set to + so its tracking
all the data conversions to ensure they are properly formatted.-->
<compiler language="vb;vbs;visualbasic;_vbscript"
type="Microsoft.VisualBasic.VBCodeProvider, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
compilerOptions="/doc+ /optionstrict+ /optionExplicit+" />

Then the xml files will be created in c:\windows\\Framework\(Framewrk#)\webSiteName\..... (look the rest of the way down). It will have the dll and xml files there.
(note, I've also included option strict and option explicit here. Remove if you want to). The important part is the compilerOptions="/Doc+" this is the part that tells the compiler to create the xml documentation.

Chuck Sndyer
May 24, 2007 at 7:49 PM
Is there a way to convert a website to a web-application? I started out many months ago with a website. Now I want to document and can't seem to do it.

I added the code from Csnyder and compiled but of course there is no dll created (that I can find!) and no XML.
May 24, 2007 at 8:11 PM
I'm not aware of any conversion options between the two project types. You may just have to create a web application and add the content from the website project to it.
May 24, 2007 at 9:42 PM

EWoodruff wrote:
I'm not aware of any conversion options between the two project types. You may just have to create a web application and add the content from the website project to it.

I expect you are right. I created a small single page webapplication and I was able to get 'something' out. It seems to have ignored my comments in the code, but it did create a help file for my index.aspx so it's a start. Now I just have to figure out how to get it to say it's vb, not C# and how to get it to print out my comments/remarks.

Thanks for your time. I'm farther ahead than I was. At least I know what I CAN'T do.
Jan 25, 2008 at 9:46 PM
Try this:

1. Add "/doc+" to the compiler options in your website as Chuck Snyder above recommends.
2. Build your website, then locate the temporary .dlls it creates under "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\<your site>" - they'll probably be a couple of levels down in temp folders. There should be a corresponding .xml file for each .dll.
3. Create a new SHFB project, and add the .xml and .dll files from this temporary directory.
4. In the Build options in the SHFB project, add your website's /bin folder to the Dependencies collection.
5. At this point, you should be able to generate documentation. You can specify any other options you like.

I used the January 2008 release of Sandcastle and SHFB GUI version This worked nicely for me, hope it's helpful for you.

Eric, thanks for a really awesome tool!
Jan 26, 2008 at 3:03 AM
Thanks for the information. I'll update the help file topic to include this information too.

Feb 6, 2008 at 5:01 AM
Hi Erik,

I am trying to get the XML generated in a c# web site but it appears that rather than adding to the xml file that it is simply overwriting on each assembly.

The following was added to the web.config and the trust level set to high:

<!-- For C# -->
<compiler language="c#;cs;csharp" extension=".cs"
type="Microsoft.CSharp.CSharpCodeProvider, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

I tried doing a build - only left the last assembly processed. Tried a published same deal - and looked in the c:\windows\\Framework directory as Patty suggested but no xml there either.

Is there something I am doing wrong?


Feb 6, 2008 at 4:10 PM
Websites are hard to document. All the known information about how to produce documentation for them can be found in the help file in the Documenting Web Projects topic in the Getting Started section. Unfortunately, I can't be of more help as I don't have any websites that I document.

Apr 14, 2008 at 4:55 AM
I've been playing around and have found that you can create your own code providers for the website build process. This lets you copy the XML comments files out as they are created and works around all of the issues people have been having. I'm also going to create a plug-in that should make it easier to document website projects. You'll be able to supply it a list of folders and it will determine the assemblies and comments files to document when the help file is built.