Skip to content
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

Issue an error when using the source generators with older versions of C# #3265

Closed
papafe opened this issue Mar 16, 2023 · 2 comments · Fixed by #3466
Closed

Issue an error when using the source generators with older versions of C# #3265

papafe opened this issue Mar 16, 2023 · 2 comments · Fixed by #3466

Comments

@papafe
Copy link
Contributor

papafe commented Mar 16, 2023

Nullability annotations have been introduced in C# 8.0, so they won't be supported in earlier versions.
We need to issue an error when developers use older versions of C#, otherwise they will have compilation errors when using the source generator

@carbonete
Copy link

Hi @papafe i have this problem in my Xamarin Forms app. This use .NetStandard 2.0 with C#7 , change to C# is not dificult but only need change .csproj to insert 8.0. But after this i receive errors
Error CS8400 Feature 'not pattern' is not available in C# 8.0. Please use language version 9.0 or greater.

I think deprecation of old and adopt only Interfaces can only be occurs more to end 2024.
The official support for Xamarin.Forms will end on May 1, 2024

@nirinchev
Copy link
Member

Looks like we only use is not once in the generated class - we should easily be able to avoid this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants