You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CA1849 does not suggest using the async methods as they do not have a string parameter
Actual behavior
CA1849 suggests that both methods should be replaced with incompatible async versions
Additional context
It makes sense to suggest async methods with additional parameters not in the synchronous method (e.g. a CancellationToken), but I don't think it should work the other way around.
If this is the intended behavior I can just rename our methods to work around it.
The text was updated successfully, but these errors were encountered:
Analyzer
Diagnostic ID: CA1849:
Call async methods when in an async method
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Version: SDK 8.0.204
Describe the bug
CS1849 suggests using an async version of a parameterless method even if the non-async version has parameters.
Steps To Reproduce
csproj:
.editorconfig
Program.cs
Expected behavior
CA1849 does not suggest using the async methods as they do not have a string parameter
Actual behavior
CA1849 suggests that both methods should be replaced with incompatible async versions
Additional context
It makes sense to suggest async methods with additional parameters not in the synchronous method (e.g. a
CancellationToken
), but I don't think it should work the other way around.If this is the intended behavior I can just rename our methods to work around it.
The text was updated successfully, but these errors were encountered: