diff --git a/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs b/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs index 8b57312809288269cb7bf7e43a62875203b106c8..a9c82f1a3b3d51cce1600735b5ca179745d0bd45 100644 --- a/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs +++ b/src/VisualStudio/Core/Def/Implementation/TaskList/ExternalErrorDiagnosticUpdateSource.cs @@ -20,7 +20,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.TaskList { [Export(typeof(ExternalErrorDiagnosticUpdateSource))] - internal class ExternalErrorDiagnosticUpdateSource : ForegroundThreadAffinitizedObject, IDiagnosticUpdateSource + internal class ExternalErrorDiagnosticUpdateSource : IDiagnosticUpdateSource { private readonly Workspace _workspace; private readonly IDiagnosticAnalyzerService _diagnosticService; @@ -79,8 +79,6 @@ public ImmutableArray GetBuildErrors() public void ClearErrors(ProjectId projectId) { - AssertIsForeground(); - var asyncToken = _listener.BeginAsyncOperation("ClearErrors"); _taskQueue.ScheduleTask(() => { @@ -140,8 +138,6 @@ private void OnWorkspaceChanged(object sender, WorkspaceChangeEventArgs e) internal void OnSolutionBuild(object sender, UIContextChangedEventArgs e) { - AssertIsForeground(); - if (e.Activated) { // build just started, create the state and fire build in progress event. @@ -324,8 +320,6 @@ private void ClearDocumentErrors(ProjectId projectId, DocumentId documentId) public void AddNewErrors(DocumentId documentId, DiagnosticData diagnostic) { - AssertIsForeground(); - var asyncToken = _listener.BeginAsyncOperation("Document New Errors"); _taskQueue.ScheduleTask(() => { @@ -336,8 +330,6 @@ public void AddNewErrors(DocumentId documentId, DiagnosticData diagnostic) public void AddNewErrors( ProjectId projectId, HashSet projectErrors, Dictionary> documentErrorMap) { - AssertIsForeground(); - var asyncToken = _listener.BeginAsyncOperation("Project New Errors"); _taskQueue.ScheduleTask(() => {