DEV Community

Alexandru Bucur
Alexandru Bucur

Posted on

3 1

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

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'">
    <DocumentationFile>bin\Debug\netcoreapp2.0\Craidd.xml</DocumentationFile>
    <noWarn>1591</noWarn>
</PropertyGroup>
Enter fullscreen mode Exit fullscreen mode

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (1)

Collapse
 
trumhemcut profile image
Phi Huynh

oh great, it works for my case as well. quite annoying :)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more