How to disable notifications in ASP.NET Core 2.0 for 'Missing XML comment for publicly visible type or member'

28 Jan 18 20:00
One minute read

I’ve started playing with ASP.NET since I wanted for a long time to start learning C# but never had the time. Now with Core 2.0 it struck closer to home.

Unfortunately, the biggest issue right now is that the documentation is sparse. Going trough the swagger tutorial requires to enable xml generation of the documentation in order to properly update the swagger definitions.

Once that’s done you’ll be met with a nice warning Missing XML comment for publicly visible type or member that unfortunately is a pita to work with when developing in Visual Studio Code since it constantly nags you when starting the debugger. Make note of the reported error code CS1591.

Now that we’re having .csproj files again, the fix is rather simple. You just need to include <noWarn>1591</noWarn> (without CS) under the DocumentationFile definition.

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

« Back to posts