Skip to content

Commit

Permalink
Set fallback AnalyzerConfigOptions when test host is cleared.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeRobich committed Dec 30, 2024
1 parent 2936447 commit 073d39f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/TestUtility/OmniSharpTestHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ public void ClearWorkspace()
{
Workspace.RemoveProject(projectId);
}

// The fallback AnalyzerConfigOptions seem to be reset when all the Projects are removed from the Workspace.
// Calling initialize again here will set them so that they are available.
WorkspaceInitializer.Initialize(_serviceProvider, _compositionHost);
}

public Task<TResponse> GetResponse<TRequest, TResponse>(
Expand Down

0 comments on commit 073d39f

Please sign in to comment.