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

Commit 32fec62

Browse files
committed
Fix for multiple projects
The original fix only handled the parse change for single projects, this fixes it to work for all projects.
1 parent 35fbbe4 commit 32fec62

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Microsoft.DotNet.CodeFormatting/FormattingEngineImplementation.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,15 @@ private Solution AddTablePreprocessorSymbol(Solution solution)
128128
/// </summary>
129129
private Solution RemoveTablePreprocessorSymbol(Solution newSolution, Solution oldSolution)
130130
{
131-
var solution = newSolution;
132-
var projectIds = solution.ProjectIds;
131+
var projectIds = newSolution.ProjectIds;
133132
foreach (var projectId in projectIds)
134133
{
135134
var oldProject = oldSolution.GetProject(projectId);
136135
var newProject = newSolution.GetProject(projectId);
137-
solution = newProject.WithParseOptions(oldProject.ParseOptions).Solution;
136+
newSolution = newProject.WithParseOptions(oldProject.ParseOptions).Solution;
138137
}
139138

140-
return solution;
139+
return newSolution;
141140
}
142141

143142
internal async Task<Solution> FormatCoreAsync(Solution originalSolution, IReadOnlyList<DocumentId> documentIds, CancellationToken cancellationToken)

0 commit comments

Comments
 (0)