Skip to content

ConfigurationManager.AppSettings is read-only #11751

@synarque

Description

@synarque

Steps to Reproduce

  1. ConfigurationManager.AppSettings.Set("test", "value")

Current Behavior

Throws System.NotSupportedException: Collection is read-only.

Expected Behavior

This works with .NET Framework.
cf. https://docs.microsoft.com/en-us/dotnet/api/system.configuration.configurationmanager.appsettings?view=netframework-4.7.2

On which platforms did you notice this

[ x] macOS
[ ] Linux
[ ] Windows

Version Used:
5.12.0.309

Stacktrace

System.NotSupportedException: Collection is read-only.
  at System.Collections.Specialized.NameValueCollection.Set (System.String name, System.String value) [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System/compmod/system/collections/specialized/namevaluecollection.cs:310 
  at System.Collections.Specialized.NameValueCollection.set_Item (System.String name, System.String value) [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System/compmod/system/collections/specialized/namevaluecollection.cs:337 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions