Remove System.Security.Permissions.SecurityPermissionAttribute from System.Private...
authorEugene Rozenfeld <erozen@microsoft.com>
Wed, 25 Jan 2017 19:09:57 +0000 (11:09 -0800)
committerEugene Rozenfeld <erozen@microsoft.com>
Thu, 26 Jan 2017 00:36:44 +0000 (16:36 -0800)
commitb6c8522d8c02d7ed3ebc0ee8200a0d7a001b1c6d
treee9fb4bc9d6e5d2cb5e92991f68fed6094cc6b008
parent6a3c584b80dde7752a595344b3dc727918c94183
Remove System.Security.Permissions.SecurityPermissionAttribute from System.Private.CoreLib.

When compiling with /unsafe+ Roslyn emits
  .permissionset reqmin
             = {class 'System.Security.Permissions.SecurityPermissionAttribute, System.Private.CoreLib,
             Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' =
             {property bool 'SkipVerification' = bool(true)}}
if System.Security.Permissions.SecurityPermissionAttribute is present.

In particular, System.Private.CoreLib.dll is compiled with /unsafe+ and has the above in the manifest.

https://github.com/dotnet/coreclr/commit/e516211b2d3a3ae2dbd80f2c94b129910a9e280d
made BclRewriter remove System.Security.Permissions.SecurityPermissionAttribute
from System.Private.CoreLib.dll but the above reference remained.

This change removes System.Security.Permissions.SecurityPermissionAttribute completely
to avoid confusion when tools are analyzing msil and try to resolve the manifest
of System.Private.CoreLib.dll.
src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
src/mscorlib/src/System/Security/Permissions/PermissionAttributes.cs
src/mscorlib/src/System/Threading/Thread.cs