The VSTHRD010 analyzer will misfire on ShowToolWindow in the sample below when adding the call to the async method that switches itself to the main thread:
private void ShowToolWindow(object sender, EventArgs e)
{
ThreadHelper.JoinableTaskFactory.RunAsync(async delegate
{
await FooAsync(); // this line is what adds the VSTHRD010 diagnostic
});
}
private async Task FooAsync()
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
}
This would be a regression from #220 which merged into master and even 9869911 which merged the same into v15.7
The VSTHRD010 analyzer will misfire on
ShowToolWindowin the sample below when adding the call to the async method that switches itself to the main thread:This would be a regression from #220 which merged into master and even 9869911 which merged the same into v15.7