Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Commit 84f1e04

Browse files
committed
Load references as metadata
In the case of loading a single project be sure to treat references as metadata instead of source. This prevents Roslyn from doing work that doesn't need to be done.
1 parent f671697 commit 84f1e04

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/CodeFormatter/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ private static async Task RunAsync(string projectOrSolutionPath, IEnumerable<str
7777
}
7878
else
7979
{
80+
workspace.LoadMetadataForReferencedProjects = true;
8081
var project = await workspace.OpenProjectAsync(projectOrSolutionPath, cancellationToken);
8182
await engine.FormatProjectAsync(project, cancellationToken);
8283
}

0 commit comments

Comments
 (0)