Last post Sep 16, 2019 02:25 PM by Gluups
Sep 16, 2019 07:48 AM|Gluups|LINK
I want to generate a documentation for my project. So far as I know, this requires to use the compiler online, with the -doc option :
CSC *.cs -doc:docfile.xml
Thanks to a german site I learned about the colon character, otherwise I only had "incorrect syntax".
But with this syntax, every reference has to be declared on the command line.
I have to explore the possibilities to have the references stored for several uses of the command.
In the help I see "@<file> : Read response file for more options"
And I presume a folder can be given for several references, for a shorter command line.
Does anyone have enough experience on that to be quicker than I for that exploration ?
A little more precise : in the project I have this reference
<PackageReference Include="Microsoft.AspNetCore.App" />
So, in the references folder of the project, I find Swashbuckle.AspNetCore (4.0.1), then I depress F4, then in the path property I find
With the file explorer I find the path of the dll in that folder, and I put this in options.txt :
I am said that Microsoft.AspNetCore is not a valid identifier, so I suppress the second line.
Then, amongst all the messages relating to other references, I get this :
Program.cs(7,17): error CS0234: The type or namespace name 'AspNetCore' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
Hum, there is also a Microsoft.AspNetCore.App reference, with path :
in which I find no dll (it seems only paths to dll files are accepted).
And I have to admit a certain perplexity.
Sep 16, 2019 10:53 AM|mgebhard|LINK
What is your question? Are you asking how to output an XML file from your code comments?
Sep 16, 2019 11:20 AM|Gluups|LINK
Oh nice, much more simple than what I thought.
I presume it still has an interest to be able to use the command line, but for the sake of it, so it is much less urgent.
Sep 16, 2019 11:20 AM|PatriceSc|LINK
You are not using VS? With the proper verbose flag in "tools", "options" you should be able to see which command line is launched by VS and start from that.
Seems you are looking for https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/response-file-compiler-option.
It's been a while but if I remember I had once a reference.rsp file with one -reference by line and thn use csc @reference.rsp.
Sep 16, 2019 01:39 PM|Gluups|LINK
It seems you mean there is a checkbox in the options dialog box that enables verbose compilation ?
Do you have any idea in what tab ? And I presume the output is in the output window ?
Oh, in "Build and Run", I found "MSBuild project build output verbosity",
and "MsBuild project build log file verbosity".
Seems this answers my both questions.
Then I think your link can appear useful, thanks.
Sep 16, 2019 02:25 PM|Gluups|LINK
Perhaps one more question, getting back to the generation of the xml doc file.
Each procedure receives tags such as [AllowAnonymous], [HttpGet], [HttpPost].
If I want them in the documentation, do I have to copy them to the summary ?
Is it possible to get a different field for them ?