Skip to content

Commit dbc7988

Browse files
Fix locating startup objects (#79027)
CPS passes us an INamespaceSymbol that is the global namespace symbol; it doesn't have a containing assembly. It does have a containing Compilation though, which is what we actually need. This is a 17.14 backport of the specific fix from #78972 but removes the other cleanup and the introduction of a new API that won't ever be consumed in 17.14. Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2506795 Fixes #78697
2 parents 995f12b + 0201a40 commit dbc7988

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/VisualStudio/Core/Def/ProjectSystem/AbstractEntryPointFinderService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal abstract class AbstractEntryPointFinderService : IEntryPointFinderServi
1212
protected abstract IEnumerable<INamedTypeSymbol> FindEntryPoints(Compilation compilation, bool findFormsOnly);
1313

1414
public IEnumerable<INamedTypeSymbol> FindEntryPoints(INamespaceSymbol symbol, bool findFormsOnly)
15-
=> symbol is not { ContainingAssembly: ISourceAssemblySymbol sourceAssembly }
16-
? []
17-
: FindEntryPoints(sourceAssembly.Compilation, findFormsOnly);
15+
=> symbol is { ContainingCompilation: Compilation compilation }
16+
? FindEntryPoints(compilation, findFormsOnly)
17+
: [];
1818
}

0 commit comments

Comments
 (0)