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.

391 questions
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
16
votes
2 answers

How should I write XML comments to avoid repeating myself between the summary and returns tags?

When the purpose of a method is to calculate a value and return it, I find myself documenting it as follows: /// /// Calculates the widget count. /// /// The control to calculate the widget count…
Matthew Strawbridge
  • 19,940
  • 10
  • 72
  • 93
16
votes
2 answers

Reference operators in XML documentation

I would like to reference an operator in a XML documentation tag, but I can't seem to find any hints on how to do it. The MSDN article on this tag only shows a simple example referencing a method, but does not go over different…
Grx70
  • 10,041
  • 1
  • 40
  • 55
15
votes
4 answers

Visual Studio XML summary comment on single line

In Visual Studio, how do I change the default XML summary comment snippet from three lines to one line? Currently it provides this snippet when I type ///: /// /// /// I would like this shorter…
Eugene
  • 10,957
  • 20
  • 69
  • 97
15
votes
1 answer

.NET Core - System.Private.CoreLib.dll vs System.Runtime

In a .NET Core App, if I do typeof(DateTime).Assembly.Location I get C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.4\System.Private.CoreLib.dll But the documentation for the DateTime struct says the assembly is System.Runtime.dll I am…
OrdinaryOrange
  • 2,420
  • 1
  • 16
  • 25
15
votes
2 answers

Can I propagate XML documentation from an interface to its implementation?

I need to propagate XML documentation from a base class to derivative(s) or from an interface to implementation(s). Can I do this using Resharper?
void
  • 1,347
  • 2
  • 13
  • 25
15
votes
1 answer

using see cref with < > characters in XML Documentation?

Possible Duplicate: How to reference generic classes and methods in xml documentation i have been using the see cref tag and it works great but now i need to include a generic list of string[] in the see cref but the documentation doesn't…
Martin
  • 23,844
  • 55
  • 201
  • 327
15
votes
2 answers

What does "///" mean?

I have inherited a bunch of C# code. For a couple of method definitions I find /// as the only XMLDoc in front of it. I tried to Google the meaning of that but was not successful. Can someone please explain what that might mean?
Andreas
  • 1,551
  • 4
  • 24
  • 55
13
votes
3 answers

Can implementation classes "inherit" XML comments from their implemented interfaces?

Curious question. I'm using Microsoft's Sandcastle to generate documentation from the XML comments in my C# code. Several of my classes are implementing interfaces which already have commented methods. I'd rather not duplicate the documentation…
Jordan Parmer
  • 36,042
  • 30
  • 97
  • 119
13
votes
2 answers

C# xml documentation: How to create Notes?

I want to achieve a similar thing to the yellow 'Note:' box in the remarks section on this MSDN page in my own documentation. I'm using sandcastle and the sandcastle help file builder to generate a reference website out of the documentation tags.…
Sebastian P.R. Gingter
  • 5,955
  • 3
  • 31
  • 73
11
votes
1 answer

Using doxygen to create documentation for existing C# code with XML comments

I've read everywhere that doxygen is the way to go for generating documentation for C# code. I've got a single interface that I want to document first (baby steps), and it already has the XML comments (///) present. Because of the vast number of…
Dave
  • 14,618
  • 13
  • 91
  • 145
11
votes
1 answer

Extra blank line displayed from and in VS2015CE, can't get rid of it

When I use tag in documentation (in form of as well) in Visual Studio 2015 Community Edition, I'm getting an extra blank line displayed in IntelliSense tooltip (the one which appears when typing in member name). I've tried…
11
votes
1 answer

How to include the xsd:documentation in the C# class generated with XSD.exe?

I am using xsd.exe to generate a C# class from a collection of xsd files. The xsd file makes use of the tag to include useful descriptions. Example:
Jim McKeeth
  • 38,225
  • 23
  • 120
  • 194
10
votes
2 answers

How can I link to MSDN/official documentation from my C# XML documentation comments?

Given an XML comment on a class something like this: ///Handles the AuthenticateRequest event in the ASP.NET page request lifecycle to authenticate users. /// ///This module will authenticate users based on cookies,…
Dylan Beattie
  • 53,688
  • 35
  • 128
  • 197
10
votes
1 answer

Add XML documentation for named elements in ValueTuple

With ValueTuple in C# 7, it is now possible to write methods and properties that return or consume composite objects without explicitly declaring a type. These named tuples can however be potentially confusing when no documentation is provided. As…
Alex Essilfie
  • 12,339
  • 9
  • 70
  • 108
1 2
3
26 27