<div>Hello I am trying to create a documentation of my code comments by using the command:</div> <div>csc.exe /doc:file.xml </div> <div> </div> <div>I am doing this for a Web application and the problem I am getting is that it cannot find the ASP.NET controls
that are defined within the .aspx files.</div> <div> </div> <div>I was able to successfully do this with standalone class files within the app_code folder, however with the partial class files that are used for ASP.NET pages I am having</div> <div>problems
doing this.</div> <div>Specifically with the .NET controls I create within the .aspx files.</div> <div>I am not familiar with compiling this using command-line options however as of now I have no choice due to my workstating with Visual Studio being unavailable.</div>
<div> </div> <div>I just want to extract the comments into an XML file and I am stuck on this.</div> <div>If anyone has any advice I'd appreciate it.</div>
Then you can use aspnet_compiler.exe to compile the web site. Internally it will generate code for the pages and controls and compile them using csc and add in your specified compiler options.
==============================================
If you get the answer to your question, please mark it as the answer.
durango2008
0 Points
16 Posts
problem using C-Sharp compiler to extract comments
Mar 04, 2009 07:49 AM|LINK
<div>Hello I am trying to create a documentation of my code comments by using the command:</div> <div>csc.exe /doc:file.xml </div> <div> </div> <div>I am doing this for a Web application and the problem I am getting is that it cannot find the ASP.NET controls that are defined within the .aspx files.</div> <div> </div> <div>I was able to successfully do this with standalone class files within the app_code folder, however with the partial class files that are used for ASP.NET pages I am having</div> <div>problems doing this.</div> <div>Specifically with the .NET controls I create within the .aspx files.</div> <div>I am not familiar with compiling this using command-line options however as of now I have no choice due to my workstating with Visual Studio being unavailable.</div> <div> </div> <div>I just want to extract the comments into an XML file and I am stuck on this.</div> <div>If anyone has any advice I'd appreciate it.</div>hongping
Contributor
3403 Points
635 Posts
Microsoft
Re: problem using C-Sharp compiler to extract comments
Mar 04, 2009 04:22 PM|LINK
You can try adding "/doc:file.xml" in each of your .aspx page in the compilerOptions attribute in the @Page directive at the top.
http://msdn.microsoft.com/en-us/library/ydy4x04a.aspx
For example
<%@ Page Language="C#" CompilerOptions="/doc:C:\myfile.xml" . . . %>
Then you can use aspnet_compiler.exe to compile the web site. Internally it will generate code for the pages and controls and compile them using csc and add in your specified compiler options.
If you get the answer to your question, please mark it as the answer.