<PackageReference Include="System.Security.Permissions" Version="11.0.0-preview.2.26159.112" />

System.Security.HostProtectionException

The exception that is thrown when a denied host resource is detected.
namespace System.Security { public class HostProtectionException : SystemException { public HostProtectionResource DemandedResources { get; } public HostProtectionResource ProtectedResources { get; } public HostProtectionException(); public HostProtectionException(string message); public HostProtectionException(string message, Exception e); public HostProtectionException(string message, HostProtectionResource protectedResources, HostProtectionResource demandedResources); protected HostProtectionException(SerializationInfo info, StreamingContext context); } }