dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.91k stars 4.01k forks source link

CS4009 should not be suppressed in the Error List window when set to "Build + Intellisense" VS2019 #32361

Open vsfeedback opened 5 years ago

vsfeedback commented 5 years ago

Create a new console application containing this code. I reproduced this in both a .NET Core 3.0 and .NET Framework 4.7.2 project.

class Program
{
    static async void Main(string[] args) { }
}

Open the Error List window, and set it to "Entire Solution", no filter, and "Build Only". Build the solution.

Observed and expected behavior: Error CS5001, error CS4009, and warning CS1998 appear in the Error List window.

Set the Error List window to "Build + Intellisense" instead of "Build Only"

Observed behavior: Error CS4009 is removed from the Error List window.

Expected behavior: Error CS4009 should not be removed from the Error List window, unless the user changes the code in a way that resolves the error.

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/414443/cs4009-should-not-be-suppressed-in-the-error-list.html VSTS ticketId: 756143 These are the original issue comments:

Dale McCoy on 1/3/2019, 00:08 PM (7 days ago):

This looks to me like this is the Visual Studio 2019 version of https://github.com/dotnet/roslyn/issues/17259 and https://github.com/dotnet/roslyn/issues/29698

These are the original issue solutions: (no solutions)

gafter commented 5 years ago

It is the IDE that decides when and where these errors are displayed.