Skip to content

Conversation

jasonmalinowski
Copy link
Member

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.

While I'm here, let's expose a better API for this to avoid this silly dance in the first place.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2506795
Fixes #78697

This existed back from when the input to the function was a namespace,
but that's not the case anymore.
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.

Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2506795
Fixes dotnet#78697
I'm not sure why this ever took an INamespaceSymbol in the first place,
but we either have code working around it, or having an (old) comment
saying the code was wrong.
@jasonmalinowski jasonmalinowski self-assigned this Jun 14, 2025
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner June 14, 2025 00:02
/// </summary>
/// <param name="compilation">The compilation to search.</param>
/// <param name="findFormsOnly">Restrict the search to only Windows Forms classes. Note that this is only implemented for VisualBasic</param>
IEnumerable<INamedTypeSymbol> FindEntryPoints(Compilation compilation, bool findFormsOnly);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonmalinowski jasonmalinowski merged commit 52732de into dotnet:main Jun 16, 2025
26 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jun 16, 2025
jasonmalinowski added a commit that referenced this pull request Jun 20, 2025
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
@jasonmalinowski jasonmalinowski deleted the fix-entrypoint-finder branch July 10, 2025 19:44
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VB.NET Professional 2022 project properties not showing splash screen in drop down.
4 participants