xml-documentation

How to refer to enum constants in c# xml docs

↘锁芯ラ 提交于 2019-12-05 10:32:52
问题 I want to document the default value of an enum typed field: /// <summary> /// The default value is <see cref="Orientation.Horizontal" />. /// </summary> public Orientation BoxOrientation; The compiler warns that it couldn't resolve the reference. Prefixing F: or M: silences the compiler, but E: also does, so I'm unsure what prefix is correct. 回答1: The prefixes F , M and E are all valid and probably the reason that the compiler warning disappears. You should however use the F that refers to

Extract xml comments for public members only

北战南征 提交于 2019-12-04 22:49:24
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 parameter descriptions) Visual Studio Intellisense with the end product. The problem with it is that the C# compiler creates documentation entries for everything (including internal classes, methods, private fields of internal enums etc.) and there seems to be no switch to "only public members" mode. Now I don't want to go over 50 files with XX

How to refer to enum constants in c# xml docs

跟風遠走 提交于 2019-12-04 22:48:35
I want to document the default value of an enum typed field: /// <summary> /// The default value is <see cref="Orientation.Horizontal" />. /// </summary> public Orientation BoxOrientation; The compiler warns that it couldn't resolve the reference. Prefixing F: or M: silences the compiler, but E: also does, so I'm unsure what prefix is correct. The prefixes F , M and E are all valid and probably the reason that the compiler warning disappears. You should however use the F that refers to fields. For more information on how Visual Studio generates documentation identifiers see: Processing the XML

How to use XML documentation files

半世苍凉 提交于 2019-12-04 16:57:03
问题 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? Not necessarily as complex as the msdn documentation viewer thingy, but at least something nicer than the pure xml... 回答1: 1: you simply drop it in the same folder as the dll 2: does it need to be persisted? For "live" use, both the VS IDE and

How to generate xml documentation for asp.net website in visual studio 2008?

我们两清 提交于 2019-12-04 09:08:57
I am trying generate XML comment for my asp.net website pages. But when i right click on the website in the solution explorer i can't find Properties instead i find Propert Pages . How to get started with xml documentation? Any suggestion. More specifically here: http://msdn.microsoft.com/en-us/library/azt1z1eh.aspx ("To build the XML Documentation sample within Visual Studio" section) I want to generate XML comments for my project in the build, but my "Configuration Properties" window does not have "folders" or a "Build" option under it. It is not quite as convenient for Web Projects. You

How to make ASP.NET WEB API HELP PAGES Xml Documentation Comments to have new line

烈酒焚心 提交于 2019-12-04 07:31:31
I have a rest api developed using ASP.NET WEB API. I used help pages nuget package in order to create documentation. One problem I encountered is the following. For my model objects, I have xml documentation comments and they become descriptions on the help pages for each member of the model. I want certain part of the description to be on a new line, but everything in the comment comes as one paragraph. I tried to add <br/> in the comments, but didn't help. Does anyone know how to achieve this? Lasse Christiansen A similar question has been asked here: Web Api Help Page- don't escape html in

Show <returns> xml tag into visual studio intellisense

梦想的初衷 提交于 2019-12-03 20:35:54
问题 I added the <returns> xml tag to some of my methods but I can't see its content in IntelliSense. Here is my code: /// <summary> /// we all live in a yellow summary /// </summary> /// <returns>what it returns</returns> public int MyMethod() { .... } Is there any way to show this content? 回答1: This currently does not work (Visual Studio 2017), and is an open issue: https://github.com/dotnet/roslyn/issues/31618 One way to make it work is to install the ReSharper Visual Studio plugin (but this is

Referring to a generic type of a generic type in C# XML documentation?

吃可爱长大的小学妹 提交于 2019-12-03 14:23:15
问题 Writing some XML documentation for a predicate helper class. But I can't figure out I can refer to an Expression<Func<T, bool>> without getting a syntax error. Is it even possible? I have tried this: <see cref="Expression{Func{T, bool}}"/> But I get a red squiggly line under {T, bool}} . This works though: <see cref="Expression{TDelegate}"/> Anyone have a clue? Update: The answer that was given (and I accepted) seemingly did work. But now I have started to get a lot of warnings about stuff

How to generate XML documentation for CSPROJ with multiple targets

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 11:27:12
问题 I have a library project that has multiple targets, e.g. in the CSPROJ file it has: <TargetFrameworks>net40;net46;net461;net462;net47</TargetFrameworks> If I want XML documentation for all combinations of these target frameworks and Debug and Release configurations I have to select each one in turn in the UI using the Build Configuration Manager and then set it to build XML documentation for that combination and each combination is then listed separately as a PropertyGroup in the CSPROJ with

How to use XML documentation files

爷,独闯天下 提交于 2019-12-03 11:00:54
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? Not necessarily as complex as the msdn documentation viewer thingy, but at least something nicer than the pure xml... 1: you simply drop it in the same folder as the dll 2: does it need to be persisted? For "live" use, both the VS IDE and "reflector" allow you to review the documentation (against the types/members/etc). There are tools to transform it