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

Remove System.ConfigurationManager support from .NET 6+ #7456

Open
wants to merge 3 commits into
base: v1.6
Choose a base branch
from

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Jan 10, 2025

Changes

close #7430

System.ConfigurationManager is deprecated and legacy - it's also a major source of problems for AOT compilation.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

@Aaronontheweb Aaronontheweb added configuration AOT Ahead-of-Time (AOT) Compilation labels Jan 10, 2025
@Aaronontheweb Aaronontheweb modified the milestone: 1.6.0 Jan 10, 2025
@Aaronontheweb Aaronontheweb marked this pull request as ready for review January 10, 2025 19:12
Copy link
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Detailed my changes

@@ -54,16 +54,21 @@ public static Config ParseString(string hocon)
return ParseString(hocon, null);
}

#if NETSTANDARD
Copy link
Member Author

Choose a reason for hiding this comment

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

Still support this method on .NET Framework

#if NETSTANDARD
var appConfig = bootstrapSetup.FlatSelect(s => s.Config).GetOrElse(ConfigurationFactory.Load());
#else
var appConfig = bootstrapSetup.FlatSelect(s => s.Config).GetOrElse(ConfigurationFactory.Default());
Copy link
Member Author

Choose a reason for hiding this comment

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

No more configuration loading from Web.config / App.config on .NET 6+

@Aaronontheweb Aaronontheweb changed the title Remove System.ConfigurationManager support Remove System.ConfigurationManager support from .NET 6+ Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AOT Ahead-of-Time (AOT) Compilation api-change configuration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant