From 2ebac33a784ef0bd401b65a7c448b314390db924 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 9 Aug 2021 12:21:14 -0700 Subject: [PATCH] Update Language Version to 10 and fix related issues (#15886) --- PowerShell.Common.props | 4 +++- build.psm1 | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/PowerShell.Common.props b/PowerShell.Common.props index 45e1f2788c..ba5e6e2dff 100644 --- a/PowerShell.Common.props +++ b/PowerShell.Common.props @@ -136,7 +136,7 @@ (c) Microsoft Corporation. net6.0 - 9.0 + 10.0 true true @@ -144,6 +144,8 @@ true true en-US + true + true true ../signing/visualstudiopublic.snk diff --git a/build.psm1 b/build.psm1 index 6028c5fdc3..f988725049 100644 --- a/build.psm1 +++ b/build.psm1 @@ -437,6 +437,14 @@ Fix steps: $Arguments += "--output", (Split-Path $Options.Output) } + # Add --self-contained due to "warning NETSDK1179: One of '--self-contained' or '--no-self-contained' options are required when '--runtime' is used." + if ($Options.Runtime -like 'fxdependent*') { + $Arguments += "--no-self-contained" + } + else { + $Arguments += "--self-contained" + } + if ($Options.Runtime -like 'win*' -or ($Options.Runtime -like 'fxdependent*' -and $environment.IsWindows)) { $Arguments += "/property:IsWindows=true" }