Skip to content

Commit 72e6c7e

Browse files
committed
Only change documents in solution
1 parent f43cd10 commit 72e6c7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Features/Core/Portable/CodeRefactorings/SyncNamespace/AbstractChangeNamespaceService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ private static SyntaxNode CreateImport(SyntaxGenerator syntaxGenerator, string n
470470
.ConfigureAwait(false);
471471
var solutionWithChangedNamespace = documentWithNewNamespace.Project.Solution;
472472

473-
var refLocationGroups = refLocationsInOtherDocuments.GroupBy(loc => loc.Document.Id);
473+
var refLocationGroups = refLocationsInOtherDocuments.Where(loc => solutionWithChangedNamespace.ContainsDocument(loc.Document.Id)).GroupBy(loc => loc.Document.Id);
474474

475475
var fixedDocuments = await Task.WhenAll(
476476
refLocationGroups.Select(refInOneDocument =>

0 commit comments

Comments
 (0)