DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   C# XML Comment Problems (http://www.daniweb.com/forums/thread15072.html)

Brent_Ritterbec Dec 5th, 2004 2:11 am
C# XML Comment Problems
 
I am working through the book Visual C#.NET Step by Step, and I came to the section of the book where the author shows how to create comments on your code with XML.

///<summary>
///The obligatory Hello World in C#
///</summary>
///<remarks>
///This program writes out Hello World
///using the WriteLine method of the
///System.Console class.
///</remarks>

This is the code the author gives. You can use Visual Studio to Build Comment Web Pages, but none of the XML (specifically the things between the summary and remarks tags) show up. Is there something wrong with my version of VC#.NET?
I can't even get my browser to view XML created webpages. If I click on one of those orange XML boxes that are on some webpages, all I get is the XML coding. Is this suppose to happen? Am I missing something?

onlykannan2000 Dec 6th, 2004 1:35 am
Re: C# XML Comment Problems
 
this is a great stuff to imorove our knowledge

casmith May 9th, 2005 11:50 am
Re: C# XML Comment Problems
 
Quote:

Originally Posted by Brent_Ritterbec
I am working through the book Visual C#.NET Step by Step, and I came to the section of the book where the author shows how to create comments on your code with XML.

///<summary>
///The obligatory Hello World in C#
///</summary>
///<remarks>
///This program writes out Hello World
///using the WriteLine method of the
///System.Console class.
///</remarks>

This is the code the author gives. You can use Visual Studio to Build Comment Web Pages, but none of the XML (specifically the things between the summary and remarks tags) show up. Is there something wrong with my version of VC#.NET?
I can't even get my browser to view XML created webpages. If I click on one of those orange XML boxes that are on some webpages, all I get is the XML coding. Is this suppose to happen? Am I missing something?


I just ran into this problem a few days ago, and found a solution.

The problem occurred after I upgrade my system to Windows XP Service Pack 2. Internet Explorer suddenly started placing the Comment Web Pages in the Restricted zone, and there is no way to tell it to stop doing so. The reason is because each HTM file has <!-- saved from url=(0007)http:// --> as the first line of the document. For whatever reason, Internet Explorer is programmed to treat these files as Restricted documents, and not run any scripts contained within them.

The easiest solution is to do a search and replace on all of these files. From within Visual Studio .NET, Ctrl+Shift+F opens the Find In Files dialog. Choose your CodeCommentReport directory as the "Look In" directory. Have it look for "<!-- saved from url=(0007)http:// -->" and replace with "" (nothing). It will take a few minutes, but when it is complete, you should be able to view your code comment reports without error.


All times are GMT -4. The time now is 1:19 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC