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

Adds .net 9 support #4763

Merged
merged 5 commits into from
Jan 23, 2025
Merged

Adds .net 9 support #4763

merged 5 commits into from
Jan 23, 2025

Conversation

brendankowitz
Copy link
Member

@brendankowitz brendankowitz commented Jan 2, 2025

Description

Adds .NET9 build target and changes Docker images to use .NET9 on AzureLinux.

Framework and SDK Updates:

  • Updated the target frameworks in Directory.Build.props to include net9.0 along with net8.0 and net6.0.
  • Modified global.json to use SDK version 9.0.102 for the project.
  • Updated the Dockerfile to use .NET SDK 9.0.102-azurelinux3.0 and runtime 9.0.1-azurelinux3.0. [1] [2]

Package Version Updates:

  • Updated HealthcareSharedPackageVersion to 8.0.30 and added conditional package versioning based on the target framework in Directory.Packages.props. [1] [2]
  • Updated various package versions, including Azure.Identity, Microsoft.SqlServer.SqlManagementObjects, and System.Data.SqlClient. [1] [2] [3]

Build Pipeline Modifications:

  • Updated the default build framework to net9.0 in build-variables.yml and added a new job for Windows_dotnet9 in ci-pipeline.yml and pr-pipeline.yml. [1] [2] [3]
  • Added a new job for Windows_dotnet8 in ci-pipeline.yml and pr-pipeline.yml to maintain compatibility with .NET 8.0. [1] [2]

Code Analysis and Suppression Rules:

  • Added suppression rules for CA1852 in the CustomAnalysisRules.ruleset file.
  • Applied code analysis suppression attributes in SmartLauncher classes to address maintainability and performance warnings. [1] [2]

Miscellaneous Updates:

  • Updated the .NET 6 SDK version in build/dotnet6-compat/global.json and added global.json for .NET 8 compatibility. [1] [2]
  • Changed the visibility of SmartLauncherConfig and Program classes to internal in SmartLauncher project. [1] [2]

These changes collectively enhance the project's compatibility with newer .NET versions, streamline package management, and improve the build and deployment processes.

Related issues

Addresses AB#136374

Testing

Describe how this change was tested.

FHIR Team Checklist

  • Update the title of the PR to be succinct and less than 65 characters
  • Add a milestone to the PR for the sprint that it is merged (i.e. add S47)
  • Tag the PR with the type of update: Bug, Build, Dependencies, Enhancement, New-Feature or Documentation
  • Tag the PR with Open source, Azure API for FHIR (CosmosDB or common code) or Azure Healthcare APIs (SQL or common code) to specify where this change is intended to be released.
  • Tag the PR with Schema Version backward compatible or Schema Version backward incompatible or Schema Version unchanged if this adds or updates Sql script which is/is not backward compatible with the code.
  • CI is green before merge Build Status
  • Review squash-merge requirements

Semver Change (docs)

Feature (new framework target)

@brendankowitz brendankowitz force-pushed the feature/dotnet-9 branch 8 times, most recently from 62080ca to 61e41fe Compare January 7, 2025 21:18
@brendankowitz brendankowitz marked this pull request as ready for review January 21, 2025 17:00
@brendankowitz brendankowitz requested a review from a team as a code owner January 21, 2025 17:00
@brendankowitz brendankowitz force-pushed the feature/dotnet-9 branch 8 times, most recently from 274a7a9 to d5d2796 Compare January 23, 2025 01:15
@brendankowitz brendankowitz added this to the 2Wk07 milestone Jan 23, 2025
@brendankowitz brendankowitz added Enhancement Enhancement on existing functionality. Open source This change is only relevant to the OSS code or release. labels Jan 23, 2025
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.403"
"version": "9.0.102"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to allow any rollforward to minor versions? Or keep it as is to a specific version?

Copy link
Member Author

Choose a reason for hiding this comment

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

Mikael had a different PR trying to address this - #4687. This PR is just adding the new target

@brendankowitz brendankowitz merged commit e330f77 into main Jan 23, 2025
48 checks passed
@brendankowitz brendankowitz deleted the feature/dotnet-9 branch January 23, 2025 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancement on existing functionality. Open source This change is only relevant to the OSS code or release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants