From b011e7f8a46e90a24f74beb534a21d50226ef5e9 Mon Sep 17 00:00:00 2001 From: Andy Gocke Date: Wed, 18 Nov 2015 00:00:31 -0800 Subject: [PATCH] Also set publicsign when not on windows --- src/Microsoft.DotNet.Tools.Compiler.Csc/Program.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Microsoft.DotNet.Tools.Compiler.Csc/Program.cs b/src/Microsoft.DotNet.Tools.Compiler.Csc/Program.cs index 82c9050a7..9db6e2550 100644 --- a/src/Microsoft.DotNet.Tools.Compiler.Csc/Program.cs +++ b/src/Microsoft.DotNet.Tools.Compiler.Csc/Program.cs @@ -142,6 +142,15 @@ namespace Microsoft.DotNet.Tools.Compiler.Csc if (options.KeyFile != null) { commonArgs.Add($"-keyfile:\"{options.KeyFile}\""); + + // If we're not on Windows, full signing isn't supported, so we'll + // public sign, unless the public sign switch has explicitly been + // set to false + if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && + options.PublicSign == null) + { + commonArgs.Add("-publicsign"); + } } if (options.DelaySign == true)