Skip to content

Remove new language features from generated type#2108

Merged
kshyju merged 2 commits intomainfrom
shkr/use_non_preview_language_Feature
Nov 30, 2023
Merged

Remove new language features from generated type#2108
kshyju merged 2 commits intomainfrom
shkr/use_non_preview_language_Feature

Conversation

@kshyju
Copy link
Copy Markdown
Member

@kshyju kshyju commented Nov 30, 2023

Removing new language features such as "target-typed object creation" & nullable reference types" as they fail in netfx projects if no explicit "LangVersion" msbuild property is specified in the csproj (<LangVersion>9.0</LangVersion>)

  1. 'target-typed object creation' needs language version 9.0 or greater
  2. 'nullable reference types' language version 8.0 or greater

Updated tests to test against multiple language versions.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

… "nullable reference types" as they fail in NetFX project if no explicit "LangVersion" msbuild property
@kshyju kshyju requested review from fabiocav and satvu November 30, 2023 02:29
@kshyju kshyju merged commit 5ff83ce into main Nov 30, 2023
@kshyju kshyju deleted the shkr/use_non_preview_language_Feature branch November 30, 2023 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants