Documentation said:
You can suppress this warning if you know that the consumer is not a graphical user interface (GUI) app or if the consumer does not have a SynchronizationContext.
But did not tell how to suppress this. Would any anybody tell how can I suppress this in ASP.NET Core Application from .editorconfig?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@TanvirArjel Thank you for the question.
Does manually configure rule severity not apply?
Assigning this to the author now.
@msebolt Thank you. Your specified link helped me. I have done this as follows:
[*.cs]
dotnet_diagnostic.CA2007.severity = none
It should have been mentioned in this documentation.
@TanvirArjel Thanks, that is a good suggestion.
As asp.net core applications do not have a context, this warning should not be on by default for asp.net core.
The document needs to be changed. It says to use:
dotnet_code_quality.CA2007.exclude_async_void_methods = true which does not disable the warning.
The correct syntax is:
dotnet_diagnostic.CA2007.severity = none
@udlose Looks like exclude_async_void_methods only excludes asynchronous methods that don't return a value, and is not the general way to suppress the warning (for which, as you mentioned, the correct syntax is:
dotnet_diagnostic.CA2007.severity = none).
If exclude_async_void_methods is not working, please either open an issue on the repo, https://github.com/dotnet/roslyn-analyzers/, or use the Report a Problem tool to report the issue. When you do this, your report becomes part of the work items that are listed in the in the Visual Studio Developer Community, which allows you to engage directly with the engineering team while they address and fix the problem.
The original issue mentioned by @TanvirArjel applies to most or all of the warnings topics, not just this one. However, there is a link to the .editorconfig topic already at the end of the Configurability section.
if the analyzers were written correctly, they would take the type of assembly they are used in into account and USERS would not have to suffer from YOUR screwups, but hey that why you don't have REAL developers on your staff right, otherwise YOUR staff would be the ones finding all the bugs instead of END USERS WASTING TIME REPORTING YOUR SHIT. How many "features" have you produced that have NO regression and where bugs are not still open after 10 years because YOU don't think they matter????? that'ts right NONE!!!!!! you can't even apply your own coding rules
Most helpful comment
As asp.net core applications do not have a context, this warning should not be on by default for asp.net core.