diff --git a/src/System.Management.Automation/engine/SecurityManagerBase.cs b/src/System.Management.Automation/engine/SecurityManagerBase.cs index 5a08746535..548bd737be 100644 --- a/src/System.Management.Automation/engine/SecurityManagerBase.cs +++ b/src/System.Management.Automation/engine/SecurityManagerBase.cs @@ -94,7 +94,7 @@ namespace System.Management.Automation // On non-Windows platform Set/Get-ExecutionPolicy return // Operation is not supported on this platform. return; -#endif +#else #if DEBUG @@ -160,6 +160,7 @@ namespace System.Management.Automation throw new PSSecurityException(AuthorizationManagerBase.AuthorizationManagerDefaultFailureReason); } } +#endif } /// diff --git a/src/System.Management.Automation/security/SecuritySupport.cs b/src/System.Management.Automation/security/SecuritySupport.cs index 4d8b65f840..05ae9f77dc 100644 --- a/src/System.Management.Automation/security/SecuritySupport.cs +++ b/src/System.Management.Automation/security/SecuritySupport.cs @@ -435,7 +435,7 @@ namespace System.Management.Automation // There is no signature support on non-Windows platforms (yet), when // execution reaches here, we are sure the file is under product folder return true; -#endif +#else // Check the file signature Signature fileSignature = SignatureHelper.GetSignature(file, null); if ((fileSignature != null) && (fileSignature.IsOSBinary)) @@ -455,6 +455,7 @@ namespace System.Management.Automation } return false; +#endif } #if !CORECLR