Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have developed a C# class library which contains numerous projects. I am using this as a common library across multiple different projects.
A number of different developers have recently joined the team and not being familiar with the library they are not sure what is contained with it. I have it well commented with the help of ghostdoc.
Is it possible to auto generate documentation using any tool of the library? I would like to run a tool against it that would generate documentation for me that I could make the developers aware of to read. I presume such a tool would generate the documentation from the comments.
I recommend using Sandcasle Help File Builder to generate documentation from your source code. You will want to review XML Documentation Comments as the quality and robustness of your generated documentation is directly related to the richness of the XML comments you use.
SHFB can generate HTML and/or compiled help documentation.
If you're using Visual Studio go to the projects' properties, select Build, then uner Ouput tick the XML documentation file checkbox.
I've recently made a simple to use library that generates markdown documentation from C# code. All it takes is a class library dll file.
If you want to give it a try, here's a link on how to start using it with examples of generated documentation.
More informations : https://www.nuget.org/packages/BetaSoftware.AutoDocumentation
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm trying to figure out how to automatically generate documentation for a single c# file in an ASP.NET project. I'm using VS 2010, and I have SandCastle, but I'm starting to get the impression it can only be used for a full project. The problem is that our entire project is huge and nothing but that one file needs documentation (it's the only one with functionality our clients use - everything else is internal)
I could do a batch script, but I'd rather not if there's a better way of going about this!
Does anybody have any ideas? Thanks very much in advance!
(as a side note, I saw this already and it did not help: Generating XML Documentation for single VB Class in WebSite Project )
I recommend using Sandcastle.
http://shfb.codeplex.com/
One thing you could do is have a post build task that pulls that portion of XML from the documentation file and then run Sandcastle or doxygen against your new XML file.
Have you tried StyleCop? It's aimed more at ensuring consistent coding practices, but does provide a little handy tool that allows you to quickly "Document this" on a constructor, method or property, etc. Might be worth a look to see if it's what you're after.
StyleCop
You can try https://www.docify.net/. Their whole thing is exactly this.
I've recently made a simple to use library that generates markdown documentation from C# code. All it takes is a class library dll file.
If you want to give it a try, here's a link on how to start using it with examples of generated documentation.
More informations : https://www.nuget.org/packages/BetaSoftware.AutoDocumentation
Doxygen might help. http://www.doxygen.nl/
At very least you can generate a word or pdf doc and then make a sub set of only the pages you need to provide.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there any way to represent class's source code as objects? I'd like to navigate through methods, theirs body etc. How tools like stylecop, ReSharper do it in Visual Studio 2010? Are there any external libraries which take as input source code file and produce representation of objects? Which i could read, modify or analyze?
As for already compiled assembly. Reflection can give you most info about object structure. But to get real code, you need to get down to IL.
As for code, that is open in Visual Studio, then VS exposes COM interface, that many of those plugins use. EnvDTE is managed wrapper around this interface. But documentation is scarce.
NRefactory will do this for you:
http://wiki.sharpdevelop.net/NRefactory.ashx
Edit: This is a "parser" which is what you want. It converts C# code into an abstract syntax tree which can then be modified with code and translated back to C#.
If you'd like just to list method, class, property names, then Reflection is a good simple solution - e.g. see simple tutorial like http://www.java2s.com/Tutorial/CSharp/0400__Reflection/ListMethods.htm
If you want more detailed analysis, including method bodies, then it might be a good idea to start from the source code from one or more of the Reflector replacements - e.g.
ILSpy - http://wiki.sharpdevelop.net/ILSpy.ashx
smooth reflector http://blog.smoothfriction.nl/archive/2011/02/07/building-your-own-reflector-with-mono-cecil-and-the-codedom.aspx
list here - Open Source Alternatives to Reflector?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Does anyone know if there is an XSD file somewhere that can be used to validate the XML documentation that gets generated when you compile a C# project with the /doc option?
I want to modify that file manually after it's been generated and I'm looking for an easy way to confirm that I haven't damaged the structure of the file.
Thanks.
I finally broke down and wrote one: XSD for Xml Comments for .NET Documentation
Stumbled across this old question today.. I didn't see this by looking at Microsoft's documentation, nor when looking at other projects that I thought might have an interest in developing such a schema; namely, the sources for the Sandcastle and (long-defunct) NDoc projects.
Short of stepping back to try to define a schema on your own, one thing I could suggest would be to use one of the many tools that will generate an XSD from XML. Microsoft includes XSD.EXE as part of Visual Studio and its SDKs.
You could write up dummy source that exercises each of the XML documentation comment tags, build the XML documentation file for it, then use XSD.EXE. to generate an XSD from that, and use it to validate the XML doc after your processing is done. But I think that could turn out to be less trivial than it sounds.
Also, XML documentation comments refer to types and code elements, and there are many things a schema won't catch; e.g., verifying that the name attribute of a <param> tag still refers to an actual parameter name in your C# source. The compiler verifies such elements at build time. But if you post-process the XML documentation, you would need a custom tool that had a reference to the original C# source or generated assemblies to re-verify such references.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I have three projects written with VB.NET (2005) and have to convert them to C# code. (I know that i don't need to convert codes of .net languages at all). I have no time to rewrite them, need a tool or script to convert.
Note: they are console applications.
Reflector lets you inspect compiled assemblies in several different .Net languages. I've known people to cut and paste the output to convert between languages. Apparently it also has an export feature.
SharpDevelop can do this, but depending you your vb.net code a lot of manual work will remain.
http://converter.telerik.com/
Another option is using Carlos Aguilar's converter. Converts from VB.NET to C# and viceversa.
Experience shows me that different converters are better than others in certain areas so I'd recommend you to use more than one, if possible, and compare their output.
There is a cool .net code conveter tool available online here. Try this if it helps to you.
Free Online .Net Code Converter
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking for some good examples of .NET XML-style source code comments and all the various tags available in use. Where can I find some good examples?
Here's a list of the recommended tags in Visual Studio, and here's a list of C# samples - many of which should have XML docs in them. One of the examples in the C# download is "XMLDoc" - and the readme from that starts with the following...
XML Documentation Sample
This sample shows how to use XML to
document code.
Helpful links:
XML Comments Let You Build Documentation Directly From Your Visual Studio .NET Source Files
Producing Professional MSDN-style Documentation with .NET and NDoc
XML Tags Used for Documentation Comments
C# and XML Source Code Documentation