Bug description
- Version of the vssdk-analyzers: 17.11.13-preview
- Analyzer rule: VSTHRD010
- Error (exception message, type, and callstack where applicable):
To Reproduce
private JoinableTaskContext joinableTaskContext;
public int Invoke(IVsInvokablePrivate pInvokable)
{
try
{
return this.joinableTaskContext.Factory.Run(async delegate
{
await this.joinableTaskContext.Factory.SwitchToMainThreadAsync();
return pInvokable.Invoke(); // Fires
});
}
catch (Exception ex)
{
return Marshal.GetHRForException(ex);
}
}
See: https://github.com/microsoft/vssdktestfx/blob/main/src/Microsoft.VisualStudio.Sdk.TestFramework/GlobalServiceProvider.cs#L299-L313
Expected behavior
Should not fire
Screenshots
Analyzer outputs warning
Additional context
Bug description
To Reproduce
See: https://github.com/microsoft/vssdktestfx/blob/main/src/Microsoft.VisualStudio.Sdk.TestFramework/GlobalServiceProvider.cs#L299-L313
Expected behavior
Should not fire
Screenshots
Analyzer outputs warning
Additional context