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

Update build/target frameworks for .NET 8; remove netcoreapp3.1. #1401

Merged
merged 12 commits into from
Nov 15, 2023

Conversation

tillig
Copy link
Member

@tillig tillig commented Nov 7, 2023

This updates the build to use .NET 8 and adds targeting for .NET 8 on all assemblies.

  • Breaking changes:
    • Removed support for .NET 3.1. .NET 3.1 has reached end of life as of December 2022.
    • Removed binary serialization support for DependencyResolutionException. .NET has been steadily working on deprecating binary serialization and as of .NET 8 things are getting caught by both [Obsolete] warnings and Roslyn analyzers telling you it's time to move. This both keeps Autofac in line with the trend toward serialization removal and reduces support overhead. People are urged to move away from binary serialization where possible; and where not, it's up to development teams to start creating mechanisms to marshal dependency resolution issues across the wire.
  • Updated VS Code extension recommendations to use the new C# Dev Kit from Microsoft.
  • Updated all dependencies to latest versions.
  • Fixed analyzer warnings.
  • Added suppressions for Roslyn analyzers that we can't obey (or, at least, not easily) in a multi-targeting scenario.

In some cases, this was "change a private method to return the concrete
type instead of an interface." This seemed reasonable and not breaking.
dotnet/docs#34893
.NET has long been deprecating BinaryFormatter and Serializable items.
Analyzers as of .NET 8 are warning about obsolete serialization
constructors. Given most of the underpinnings of this mechanism are also
being deprecated, it seemed reasonable to include deprecation for that in
Autofac.

For projects that continue to use AppDomains and need to serialize
exceptions over the wire, it's recommended to not upgrade Autofac to
this version.
Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5af8326) 78.47% compared to head (0b78ed3) 78.46%.

❗ Current head 0b78ed3 differs from pull request most recent head 7a25198. Consider uploading reports for the commit 7a25198 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1401      +/-   ##
===========================================
- Coverage    78.47%   78.46%   -0.02%     
===========================================
  Files          201      200       -1     
  Lines         5715     5702      -13     
  Branches      1169     1168       -1     
===========================================
- Hits          4485     4474      -11     
+ Misses         716      714       -2     
  Partials       514      514              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

alistairjevans
alistairjevans previously approved these changes Nov 15, 2023
Copy link
Member

@alistairjevans alistairjevans left a comment

Choose a reason for hiding this comment

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

Did you want to do the major version bump in here, since we'll merge #1397 as well before release?

@tillig
Copy link
Member Author

tillig commented Nov 15, 2023

Good point; there's also breaking change due to the exception serialization thing. I'll add that.

@tillig tillig merged commit e61a651 into develop Nov 15, 2023
2 checks passed
@tillig tillig deleted the feature/net8 branch November 15, 2023 15:27
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