313 questions
3
votes
5
answers
187
views
Using Perl string substitution, how to delete lines containing (indented) XML comments only?
I wrote some server providing XML output with some debugging comments, like this (just a short extract):
<Result>
<Channel>DB1.PagesFreeMinPct</Channel>
<Value>55.578&...
12
votes
0
answers
926
views
Documentation comments for record types with primary constructors in C#
I can declare a C# positional record like this:
public record Box(double Capacity);
which results in the definition of a record class named Box with a property named Capacity, as well as a primary ...
0
votes
2
answers
234
views
Is there an alternate way to add Swagger comments?
I would like to get method comments that are in a manager class that is directly called by a controller to show up in Swagger UI. The only way I know of to do that is to copy and paste the comments ...
0
votes
1
answer
67
views
Documenting *not* overriden methods with different XML comments
I have some base class and multiple classes inheriting from it. Those derived classes usually won't override the default constructor. Nevertheless, I'd like to change the documentation of that default ...
5
votes
1
answer
976
views
How to reference a nested generic type in C# doc comments
In C# it is possible to add doc comments to methods. In the description it's possible to put a reference to another type using the <see cref="..."/> tag. When putting a generic type in ...
2
votes
3
answers
2k
views
Getting XML comments from multiple .csproj files to populate in Swagger UI
I know that similar questions have been asked here but I'm truly at a loss. I currently have around 5ish .csproj files as a part of a web application that all contain XML comments. Proj1 is the only ...
1
vote
1
answer
98
views
Mouse over variables and functions tips
I know that i need to add ///<summary> to have mouse over tips on functions and variables but is there a way to make this happen only with the // ?
In the pre-built default functions i always ...
6
votes
1
answer
1k
views
xml-comments of nuget package do not show up
I have created my own nuget package:
https://www.nuget.org/packages/Chia-Client-API/
In the code of the package, I documented all functions with xaml comments:
/// <summary>
/// returns all ...
1
vote
1
answer
348
views
Visual Studio Refactoring changes to many things
Example: When i rename the following function
public void Foo(){}
to
public void Bar(){}
Then visual studio changes all constant strings, that contain the word "Foo" and replaces "Foo&...
1
vote
1
answer
446
views
XML comments cannot correctly reference properties named 'Item'
Given the following code:
class FixedWidthReader<T>
{
public T? Item { get; private set; }
/// <summary>
/// Populates <see cref="Item"/>.
/// </summary&...
0
votes
2
answers
156
views
How to add comments in XML using python
XML i am parsing:
<List>
<Item>
<Price>
<Amount>100</Amount>
<Next_Item>
<Name>Apple</Name>
...
0
votes
0
answers
163
views
C# XML comment to say 'no exceptions thrown'?
In C# XML comments, we have the <exception> tag to say that a method throws a particular type of exception.
What is the best way to tell the library users that a method does not throw any (...
0
votes
0
answers
655
views
CDATA sections and comments are lost when parsing XML with ElementTree
I am editing xml files, I ran into the problem that when changing a file in a python script, its structure is lost.
Xml file:
<?xml version="1.0" encoding="UTF-8"?>
<main&...
8
votes
2
answers
5k
views
Visual Studio 2022 not showing parameter XML docs tooltips on mouse over
As pictured, the "param" part of the summary is not showing on mouse over panel.
Should I expect them to be there or is the "param" functionality not working as I think it should?
...
0
votes
1
answer
478
views
Intelli sense not showing for custom methods with xml comments
I have an interface with XML comments on
namespace NamespaceName.Core.Services
{
public interface ITransaction : IDisposable
{
/// <summary>
/// Sends message into the ...
3
votes
0
answers
292
views
XML Comment for C# function with out parameter
C# function with out parameter.
public static bool theFunction(string param1, out ulong param2) {
param2 = 103206309L;
return true;
}
How is the out param2 properly denoted in an XML comment?
...
0
votes
1
answer
320
views
How to write more detailed XML comments in C#?
I was writing some XML comments for some variables and discovered that if I have a short summary block, when I hover over the variable I get tooltip with that summary. However, if I have a long tag ...
0
votes
1
answer
1k
views
Capturing commented text in an XML
I am trying to collect information from the World Bank. In particular, data from this website.
https://microdata.worldbank.org/index.php/catalog/3761/get-microdata
The "DDI/XML" link ...
0
votes
1
answer
385
views
VS 2019 - quick action menu items missing
I have two Win10 PC, both with the same installation VS2019 Enterpsrise(Version 16.11.15). Almost the same extensions. But in one VS installation, quick action menu and it's options look like on the ...
0
votes
0
answers
162
views
XmlReader and malformed comments
I am using this code to load XML that has the potential for errors (human edited).
$xmlReaderSettings = [System.Xml.XmlReaderSettings]::new()
$xmlReaderSettings.CloseInput = $True
$xmlReaderSettings....
0
votes
1
answer
1k
views
Preserve comments outside the root element of xml file
I am updating the xml file using python xml module and I want to preserve all the comments, using insert_comment variable is preserving the comments inside root element but removing outside/end of the ...
1
vote
1
answer
2k
views
Resharper avoid "Parameter has no matching param in the XML comment" for extention methods
I have a class of extension methods which I want to have good XML comments for.
An example function looks like this
/// <summary>
/// Does something cool and assigns the result to <paramref ...
3
votes
1
answer
922
views
how to read xml comment from Property in constructor?
public class MyClass {
/// <summary>
/// My awesome class
/// </summary>
/// <param name="i_a">This is test of A</param>
/// <param ...
1
vote
0
answers
2k
views
How can I remove HTML comment in a .vue file?
I build a webpack project, to compile my .vue files.
Then I write some HTML comments in the .vue file, and I build file using webpack, while the mode is "production".
But when I browse the ...
0
votes
1
answer
191
views
API Documentation using XML Comments in SwaggerHub
I am trying to update API documentation for REST APIs.
Currently, I have a C# Asp.net Web API code and Swashbuckle.AspNetCore.
I am editing and adding XML comments in C# using Visual Studio to update ...
5
votes
0
answers
1k
views
Adding Xml Documentation for Razor components (no code behind)
i have seen a similar question here but only with code behind:
Adding XML documentation for Razor components
am I forced to use code behind for a razor component to add Xml Documentation to it?
0
votes
0
answers
38
views
Calculating % of types and members which have XML comments
Does anyone know of an easy way for calculating what percentage of types, methods, and properties in a C# project are decorated with XML comments?
I am considering ways of improving on our code ...
2
votes
1
answer
876
views
Is it possible to change default XML comments in Visual Studio 2019+?
Before this gets marked as duplicate, I know this question has been asked in the past [1] [2], but the answers are extremely outdated and only contain workarounds and 3rd party tools.
The exact ...
0
votes
2
answers
781
views
How to use #if in an XML comment
I'm writing a library with source code common to the server and the client.
The problem I have is inside XML comments, where sometimes the client and server documentation differs, something like:
///...
4
votes
1
answer
665
views
Is there an efficient way to handle repeating XML comments C# code in Visual Studio
I am using Visual Studio for a couple of years now and we have always just written all the XML comments for our C# code manually.
But lately I recognize the need for a way to centrally maintain ...
2
votes
1
answer
321
views
How to remove a comment tag from XmlDocument with Inno Setup
I would like to remove a comment tag from a XmlDocument using Inno Setup. My xml looks approximately like this.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
...
0
votes
0
answers
81
views
XML comments for objects using WithEvents not showing
XML comments do not show up when an object instance is defined using WithEvents; however, comments will show up for everything else. How do I resolve this?
EDIT
''' <summary>
''' Represents a &...
2
votes
1
answer
2k
views
Can not found file Xml comment in Web API(.NET 5 web API)
This is a picture of the code config file path of XML comment file.
When I deploy in Azure, I have a problem that It can't find this XML file
-4
votes
1
answer
204
views
Why do some XML-Comment show up strangely?
Reproduce as follows:
Create a WPF application (.Net 4.8).
Click on the codebehind tab.
Hover over the class name (MainWindow).
You will now see a popup saying
MainWindow
instead of saying
...
0
votes
1
answer
403
views
VS2019 - Automaticly generate XML comment for methods and classes when you save the file
In Visual Studio, you can write /// to create an XML documentation comment above a C# method or class. The problem is that you have to manually type three slashes, which is too much for some ...
14
votes
1
answer
5k
views
Is there any way to preserve white space in C# XML comments?
I'm currently documenting my C# code and would find it useful to include a code block that directly shows how a piece of code should be called. I use the <code> tag that is embedded into the ...
0
votes
1
answer
470
views
xmlstartlet how can I insert <!--- comment --> line above node
I want to add a commentline inside a xml file above the node
using xmlstartlet
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book>
<title lang=...
1
vote
1
answer
42
views
Create Variable From Commented Out XML Values With PowerShell
I have a license file with a lot of commented out fields that I need to make into variables. The different lines may or may not exist, so I need to find out if the line exists, and if it does, turn ...
2
votes
2
answers
4k
views
Configure warnings for mising xml comments in .editorconfig (Visual Studio 2019)
is it possible to configure an .editorconfig file to display warnings/errors on items with missing XML documentation?
It would be great to see such warnings in the editor.
Thanks in advance.
1
vote
1
answer
854
views
Punctuation marks in C# XML comments [closed]
Should I add punctuation marks (e. g. ".") in my c# xml comments?
In the official Microsoft xml comment documentation there is now statement.
Also you can see in that in this documentation ...
4
votes
1
answer
5k
views
Different colors in C# XML documentation comments
I'm trying to have different colors of text in the XML doc comment like how the word true, false and Window are in blue and green colors in the picture below.
I tried decompiling the code that had ...
15
votes
3
answers
4k
views
Documentation comments for properties of positional records in C#
If I have a positional record like this:
public record Version(int Major, int Minor);
it seems that I can only provide a <summary> documentation, like this:
/// <summary>
/// Version ...
1
vote
1
answer
492
views
VS2019 (16.8.1), C#, XML Comments, Intellisense not showing
I have a Xamarin Forms project (C#) that I am working on in VS2019 (16.8.1) and I have noticed that if I add XML comments to the properties of classes within the project they are not then showing up ...
1
vote
2
answers
272
views
how to add comment in xml subelement at element start
I am using lxml in an attempt to to output the following xml code:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<students>
<!--
学生信息表
...
1
vote
0
answers
72
views
What is the difference between using the C# Description attribute and XML documentation comments (triple-slash comments)? [duplicate]
Is there a difference between using the C# Description attribute and XML documentation comments (triple-slash comments)? When should I use either one?
Thanks.
/// <summary>
/// This is my class.
...
0
votes
1
answer
1k
views
How can I export XML code documentation in vb.net?
In vb.net I can write an XML documentation by using some tags, like the following
'''<summary>
''' Hello there!
'''</summary>
In Java, I simply can export my Javadoc documentation in a ...
0
votes
1
answer
236
views
Is there a converter that converts XML to YAML and includes comments?
I'm trying to find a service, library, utility, whatever that converts XML to YAML and includes comments. It's easy to find a lot of XML to YAML converters, but I can't find one that includes XML ...
1
vote
1
answer
401
views
Is it possible to have a ctrl+click able link to a file with relative path in the comment
I need to link a file in a comment so that others can click it and the explorer opens the folder or the file opens
I need something like this:
/// <summary>
/// Does something see file://$(...
1
vote
0
answers
281
views
How to pass value to a 'file' parameter of <include> XML comment?
I have a .NET Core web app.
I am using multiple <include file=...
tags in comments in my code and I want to store the 'filename' value as a constant and pass it to each of my tags to get rid of ...
2
votes
1
answer
176
views
Compare-Object NOT working when a line has "-->" (xml files saved as txt)
I am building another web server "web2", which must have the same configuration as web server "web1"
So after installing some software I need to edit the "web.config" on the "web2" server to match ...