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

EES-4975 Update projects to .NET 8, ASP.NET Core 8, Entity Framework 8 and C# 12 #4639

Merged
merged 23 commits into from
Mar 21, 2024

Conversation

benoutram
Copy link
Collaborator

@benoutram benoutram commented Mar 8, 2024

This PR updates the projects (excluding the Public API projects which are already up to date) to use .NET 8, ASP.NET Core 8, Entity Framework Core 8, and set the language version to C# 12.

⚠️ Updating to .NET 8 relies on our function apps being switched to the 'Isolated worker model' rather than the 'In-process model' which is not compatible with .NET 8 yet. The update to the function apps was done as a separate before being merged into this one. Refer to the description of #4673 for additional changes associated with the update to the function apps. ⚠️

As well as the update to .NET 8, this PR:

  • Updates the README to remove references to .NET 6.
  • Removes <LangVersion> from all .csproj files to ensure projects use the recommended compiler version for the target framework. This is C# 12 for .NET 8.0.
  • Updates Automapper package dependency from v9 to v13 for compatibility with .NET 8. This upgrade is possible after IdentityServer4.EntityFramework.Storage was recently removed which was blocking it.
  • Removes the dependency on AutoMapper.Extensions.Microsoft.DependencyInjection which is no longer required since AutoMapper v13.
  • Updates CompareNETObjects package dependency for compatibility with .NET 8.
  • Removes Trusted_Connection=false from Content database connection strings in local settings, because the default is false.
  • Adds TrustServerCertificate=True to database connection strings in local settings after breaking change to the Encrypt parameter (defaulting to true) were introduced by EF Core 7.0.
  • Removes IsExternalInit package dependency from all projects which hasn't been needed since C# 9.
  • Updates the Renovate conifg, removing any restrictions which are no longer necessary after this update.
  • Updates unit tests in ProblemDetailsResultFilterTests.cs due to RFC 7231 becoming obsolete, replaced by RFC 9110.
  • Removes method SetUnixPermissions used when creating zip files related to EES-2236 because it's no longer needed.
  • Updates third-party package dependencies unrelated to the .NET 8 update, seen in renovate chore(deps): update major backend dependencies (major) - autoclosed #4492 and chore(deps): update minor backend dependencies #4330.
  • Changes Publish scheduled date in 'release status' robot test to be before Cronos max allowed year 2499 due to exception being thrown if max year is exceeded since Cronos 0.8.0.
  • Fixes infrastructure for Notifier function app which was missing the siteConfig element from within properties. Hoisted several settings which should be within siteConfig which should fix EES-4445 caused by missing/inconsistent CORS config in environments.
  • Adds database migration to configure SQL Server cascade delete foreign key relationships between KeyStatistics base type and both KeyStatisticsDataBlock and KeyStatisticsText sub-types following breaking change in EF7. See Breaking changes in EF Core 7.0.

@benoutram benoutram force-pushed the EES-4975-dotnet8 branch 2 times, most recently from 2968bf3 to 00383c5 Compare March 20, 2024 10:32
@benoutram benoutram force-pushed the EES-4975-dotnet8 branch 2 times, most recently from becd192 to 744690f Compare March 20, 2024 16:01
@benoutram benoutram removed the do not merge Don't merge just yet label Mar 21, 2024
@benoutram benoutram merged commit 9758651 into dev Mar 21, 2024
7 checks passed
@benoutram benoutram deleted the EES-4975-dotnet8 branch March 21, 2024 17:03
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.

2 participants