-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid file private
visibility when targeting LangVersion < 11
#46496
Comments
Thanks for contacting us. We're moving this issue to the |
We should just error out if you aren't using a new enough C#. It is what we do in other source generators - i.e. Regex and Config Binder. ex. dotnet/runtime#83996 |
Does raise an interesting question. With source generators the language version we rely on when we release 8.0 becomes part of the contract. Moving to newer language features could be considered a breaking change. |
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 useinternal
visibility for those scenarios.The text was updated successfully, but these errors were encountered: