Skip to content

Commit 3c013a3

Browse files
authored
Allow add using to work on Razor generated documents (#79530)
Completely missed this because Razor cohosting tests don't use the Roslyn OOP.
2 parents a4fd5b7 + b7112b3 commit 3c013a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Workspaces/Remote/ServiceHub/Services/MissingImportDiscovery/RemoteMissingImportDiscoveryService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public ValueTask<ImmutableArray<AddImportFixData>> GetFixesAsync(
3939
{
4040
return RunServiceAsync(solutionChecksum, async solution =>
4141
{
42-
var document = solution.GetDocument(documentId);
42+
var document = await solution.GetDocumentAsync(documentId, includeSourceGenerated: true, cancellationToken).ConfigureAwait(false);
4343
if (document is null)
4444
return [];
4545

@@ -68,7 +68,7 @@ public ValueTask<ImmutableArray<AddImportFixData>> GetUniqueFixesAsync(
6868
{
6969
return RunServiceAsync(solutionChecksum, async solution =>
7070
{
71-
var document = solution.GetDocument(documentId);
71+
var document = await solution.GetDocumentAsync(documentId, includeSourceGenerated: true, cancellationToken).ConfigureAwait(false);
7272
if (document is null)
7373
return [];
7474

0 commit comments

Comments
 (0)