Reputation: 669
I've searched and only found questions from people who want to suppress this warning such as Visual Studio Disabling Missing XML Comment Warning, or how to show it for only certain types of member, or how to add it to private members.
However for me this warning has never shown, in any of my copies of Visual Studio... and I want it to. I didn't even know the warning existed until today. I like to document my code, and want to know I've not missed any places.
Using the link above I've gone through the suggestions for disabling it in the accepted answer and checked none of those have already been done without my knowledge or without me remembering.
However this is happening (or not happening) in all copies of Visual Studio I have used in recent years, VS2013 Pro and VS2013 Express and VS2015 Community. And is the same across many projects, including ones I started myself from scratch and ones I have inherited from other developers.
Is there something I need to do to enable it in these versions? I'm confused as to why I'm not seeing it.
Upvotes: 10
Views: 8498
Reputation: 1592
Use the Directory.build.props file at the root of the solution to set this property on for all projects in a solution. That way you can switch it on for all projects simultaneously via one line. Add this line :
<GenerateDocumentationFile>true</GenerateDocumentationFile>
in the following section of the Directory.Build.props:
<Project>
<PropertyGroup>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
</Project>
Upvotes: 6
Reputation: 391306
You have to ask Visual Studio to output an XML documentation file as part of the build process to get those warnings.
Without that setting, Visual Studio will ignore those XML comments, except inside the same solution. Visual Studio will show documentation in intellisense and on mouseover in your code if the documentation is also part of the same solution but it will not complain about missing or incorrect items.
The setting you're looking for is in the project properties:
Note that this setting is changed per build-configuration, so you should enable it for both DEBUG and RELEASE if you want the warnings for both build configurations.
Upvotes: 11