-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
BinaryFormatter deprecation for System.Configuration.ConfigurationManager #50531
Conversation
Tagging subscribers to this area: @safern Issue DetailsThis is a draft PR to turn off the BinaryFormatter code paths by default in System.Configuration.ConfigurationManager. Essentially all I'm doing here is deprecating @buyaa-n @joperezr @krwq @safern @steveharter @maryamariyan (these are the current/past area-owners). I'm not super familiar with this area so I'd like feedback about the approach here from the area owners. Specifically, if you can think of the following, that would be super appreciated:
This is NOT the most minimal change. We might be able to get away with just marking Fixes #39295
|
Friendly ping for @buyaa-n @joperezr @krwq @safern @steveharter @maryamariyan @GrabYourPitchforks |
...stem.Configuration.ConfigurationManager/src/System.Configuration.ConfigurationManager.csproj
Show resolved
Hide resolved
...aries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsProperty.cs
Outdated
Show resolved
Hide resolved
.../System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyValue.cs
Show resolved
Hide resolved
.../System.Configuration.ConfigurationManager/src/System/Configuration/SettingsPropertyValue.cs
Show resolved
Hide resolved
...iguration.ConfigurationManager/tests/System/Configuration/BinaryFormatterDeprecationTests.cs
Outdated
Show resolved
Hide resolved
...es/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsSerializeAs.cs
Show resolved
Hide resolved
...aries/System.Configuration.ConfigurationManager/src/System/Configuration/SettingsProperty.cs
Outdated
Show resolved
Hide resolved
@@ -667,4 +667,4 @@ | |||
<data name="DuplicateFileName" xml:space="preserve"> | |||
<value>The file name '{0}' was already in the collection.</value> | |||
</data> | |||
</root> | |||
</root> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset changes to this file
06d019f
to
f3e6d94
Compare
@steveharter : I'm guessing you have the most context with this library at the moment? |
Note the test failure in CI (not support on .NET Framework)
|
@@ -0,0 +1,44 @@ | |||
// Licensed to the .NET Foundation under one or more agreements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we also care about adding a test case using reflection as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in general we don't care about binary formatter usage if it is called explicitly via reflection by a user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, aside from CI test issues
This is a draft PR to turn off the BinaryFormatter code paths by default in System.Configuration.ConfigurationManager. Essentially all I'm doing here is deprecating
SettingsSerializeAs.Binary
and hiding theBinaryFormatter
related code paths behind an AppContext switch.@buyaa-n @joperezr @krwq @safern @steveharter @maryamariyan (these are the current/past area-owners). I'm not super familiar with this area so I'd like feedback about the approach here from the area owners. Specifically, if you can think of the following, that would be super appreciated:
This is NOT the most minimal change. We might be able to get away with just marking
SettingsSerializeAs.Binary
asObsolete
. I, however, chose to be more conservative and hid all the BinaryFormatter code paths behind an AppContext switch since this way we actually deprecate the BinaryFormatter code paths.Fixes #39295
cc @GrabYourPitchforks