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
The text was updated successfully, but these errors were encountered:
jasekiw
changed the title
VSTHRD110 does not catch EventCallback.InvokeAsync()
Installing Nuget package Microsoft.VisualStudio.Threading.Analyzers breaks dotnet watch reload
Oct 11, 2021
jasekiw
changed the title
Installing Nuget package Microsoft.VisualStudio.Threading.Analyzers breaks dotnet watch reload
EventCallback.InvokeAsync is not caught by VSTHRD110
Oct 11, 2021
Thanks for reporting. Looking at the signature of InvokeAsync I see it returns Task, so I would expect this to work.
Do you have the vs-threading analyzers installed in your Blazor project? Can you provide a repro?
I created a Blazor app and pasted in your code and at first no diagnostic was generated. Then I installed the Microsoft.VisualStudio.Threading.Analyzers package and the diagnostic appeared right away:
Bug description
In Blazor if an EventCallback is defined in a parameter and then invoked, VSTHRD110 does not warn if await is not called on
InvokeAsync()
.Repro steps
Expected behavior
The warning should show
Actual behavior
No warning is shown.
The text was updated successfully, but these errors were encountered: