dotnet / dotnet/aspnetcore

Avoid `file private` visibility when targeting LangVersion < 11

Open
#46,496 3 comments 0 reactions 0 assignees View on GitHub
area-minimal feature-rdg
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

The RequestDelegateGenerator currently emits a class with `file private` visibility to avoid leaking implementation details to user space. This can be problematic if users are targeting a language version below C# 11. To avoid this, we'll want to use `internal` visibility for those scenarios.

Contributor guide

Open the contributing guide

Research direction

Locate the RequestDelegateGenerator and inspect where it emits the generated class visibility and handles the target language version. Verify the behavior for language versions below C# 11 and newer versions; done means older targets compile with internal visibility while newer targets retain file private visibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.