C# – XML documentation parameter warnings (CS1571, CS1572, CS1573)

When you’re using XML documentation comments in your code, eventually the comments will get out of sync with the code. This is especially true for method parameters, which are documented by <param> tags. When you add, delete, or rename a parameter manually, it’s easy to forget to update the <param> tags. Fortunately, the compiler detects … Read more

How to generate XML documentation and include it in a nuget package

XML documentation comments serve two purposes: Intellisense shows the comments to devs using your code. You can generate a documentation file and include it in your build and nuget package. In this article I’ll show how to automatically generate an XML documentation file and how to include it in a nuget package. 1 – Write … Read more

ASP.NET – Use Swagger to generate API documentation

The simplest way to add API documentation is to use Swagger. You can configure it to generate an API documentation page and even send requests to your endpoints. Here’s what it looks like: In this article I’ll show how to install and configure Swagger with the following features (shown in the image above): Generates an … Read more