problem using C-Sharp compiler to extract comments RRS feed

  • Question

  • User-1059650272 posted


    Hello I am trying to create a documentation of my code comments by using the command:
    csc.exe /doc:file.xml
    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.
    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
    problems doing this.
    Specifically with the .NET controls I create within the .aspx files.
    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.
    I just want to extract the comments into an XML file and I am stuck on this.
    If anyone has any advice I'd appreciate it.
    Wednesday, March 4, 2009 3:49 AM


  • User-762694769 posted

    You can try adding "/doc:file.xml" in each of your .aspx page in the compilerOptions attribute in the @Page directive at the top.


     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.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 4, 2009 12:22 PM