Questions tagged [xml-documentation]

XML documentation is the way to generate automatic documentation from comments inside the code, to an XML formatted file that can be shown with any method, for e.g. a web page.

XML documentation are comments that form the documentation for C# programs. They are so called because they contain nested XML fragments. See Microsoft's XML Documentation Comments (C# Programming Guide) for more details.

363 questions
28
votes
6 answers

How to document the structure of XML files

When it comes to documenting the structure of XML files... One of my co-workers does it in a Word table. Another pastes the elements into a Word document with comments like this:
joe
  • 15,556
  • 35
  • 90
  • 129
28
votes
1 answer

Annotating Methods in Delphi?

I have a piece of code that needs some serious documenting and wanted to ask whether a feature similar to C#/.NET's In-code XML-Documentation is available for Embarcadero Delphi. My aim is to display some sort of information on how to use a specific…
FLClover
  • 504
  • 5
  • 13
27
votes
2 answers

How to generate XML documentation for CSPROJ with multiple targets

I have a library project that has multiple targets, e.g. in the CSPROJ file it has: net40;net46;net461;net462;net47 If I want XML documentation for all combinations of these target frameworks and Debug and…
Ian Mercer
  • 35,804
  • 6
  • 87
  • 121
27
votes
2 answers

C#, XmlDoc: How to reference method overloads

If I have these two methods public Foo Get(string bar) { ... } public Foo Get(int bar) { ... } And write this piece of xml documentation on a different method /// /// Has a close relation to the methods. ///…
Svish
  • 138,188
  • 158
  • 423
  • 589
25
votes
4 answers

Documenting F# Code

In a C# class with a single constructor, I can add class summary XML documentation and constructor XML documentation: /// ///This class will solve all your problems /// public class Awesome { /// /// Initializes…
Akash
  • 2,211
  • 1
  • 19
  • 35
24
votes
3 answers

How to make a cref to method overloads in a tag in C#?

I see in MSDN links such as "CompareOrdinal Overloads". How can I write such a link in C#? I tried: MyMethod Overloads But the compiler gives me a warning about being an ambiguous reference for the method which…
Hosam Aly
  • 38,883
  • 35
  • 132
  • 179
23
votes
4 answers

Using Markdown for source code documentation

I am looking for an alternative to C#'s XML source code documentation which introduced by the very nature of XML a lot of noise that is heavy on the eye and more work to write: /// /// This is text of importance. Linking to ///
chiccodoro
  • 13,709
  • 16
  • 83
  • 129
21
votes
2 answers

The purpose of using both and tags in Visual Studio XML documentation

I'm working in C# in VS 2012, adding XML documentation to my code, and I've accidentally turned on a StyleCop rule (SA1609, specifically), which "validates that a public or protected property contains a documentation header with a value…
Philip C
  • 1,667
  • 28
  • 45
20
votes
6 answers

How to write comments / documentation for variables / fields / lists in VS 2010?

There is /// ///This is summary for some class or method /// documentation for classes or methods. But how to write this for simple variables or lists? I use Visual Studio 2010 and when i hover over some list, property or what…
Gero
  • 10,601
  • 18
  • 58
  • 101
20
votes
2 answers

How to refer to enum constants in c# xml docs

I want to document the default value of an enum typed field: /// /// The default value is . /// public Orientation BoxOrientation; The compiler warns that it couldn't resolve the reference. …
Bruno Martinez
  • 2,569
  • 2
  • 33
  • 45
19
votes
4 answers

How to use XML documentation files

When using an external assembly which comes with an XML documentation file, how do I get visual studio to find it? When having an XML documentation file, is there a program or xml transform file or something I can use to look at it in a nice way?…
Svish
  • 138,188
  • 158
  • 423
  • 589
19
votes
6 answers

Extract xml comments for public members only

I'm using xml comments to document public as well as internal and private members of my components. I would like to package the generated documentation xml files with component assemblies in order to enable "rich" (e.g. with method, exceptions and…
liggett78
  • 11,058
  • 2
  • 27
  • 27
19
votes
7 answers

How do I export the code documentation in C# / VisualStudio 2008?

I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on. Today I actually have to do so, but am having trouble finding out how. Is there…
Daren Thomas
  • 61,662
  • 38
  • 143
  • 192
19
votes
6 answers

How can I disable a specific warning for a C# project in VS2012?

I am trying to generate partial XML documentation during my build process for a C# project in VS2012. When I check the XML documentation file option in Project->Properties->Build, I get a build warning for each public member that lacks…
ChaseMedallion
  • 19,262
  • 13
  • 76
  • 137
17
votes
5 answers

How can I prevent Visual Studio from locking the xml documentation files in the bin directory?

My visual studio solution includes a web application and a unit test application. My web application uses log4net. I want to be able to use msbuild from the command-line to build my solution. However, whenever I build the solution from the…
SteveBering
  • 947
  • 1
  • 12
  • 30
1
2
3
24 25