ConfigurationManager 包不再引用 System.Security.Permissions

System.Configuration.ConfigurationManager 不再引用包 System.Security.Permissions

已引入的版本

.NET 8 预览版 3

以前的行为

System.Configuration.ConfigurationManager 引用了 System.Security.Permissions 包。

新行为

从 .NET 8 开始,System.Configuration.ConfigurationManager 包不引用 System.Security.Permissions 包。

破坏性变更的类型

此更改可能会影响 源兼容性

更改原因

引用 System.Drawing.Common 时,此变更可避免对 System.Configuration.ConfigurationManager 的依赖,该依赖主要是非 Windows 操作系统的问题。

System.Drawing.Common依赖项由以下包依赖项引起:

System.Configuration.ConfigurationManager
└──System.Security.Permissions
    └──System.Windows.Extensions
        └──System.Drawing.Common

如果你的应用引用了System.Configuration.ConfigurationManager包,并且你还依赖于System.Security.Permissions包或其任何依赖项(可能包括System.Windows.ExtensionsSystem.Security.AccessControl)或者System.Drawing.Common,则需要直接或间接引用这些包。

受影响的 API