Although I try to make my API’s as descriptive as possible, sometimes good documentation can still make a difference.
One way to enable documentation generation is through Visual Studio:
- Right click on your project and select Properties.
- On the Properties window go to the Build tab.
- Check the XML documentation file checkbox
- Don’t forget to save these changes.
As a result the following is added to your csproj file:
There are a few things I don’t like about this:
- First a condition is applied to the PropertyGroup which doesn’t seem necessary
- Second an absolute path is used to define where to generate the documentation XML
So I would recommend no longer to use this approach. What you can do instead is directly manipulate the csproj file and add the following line to a PropertyGroup: