Update Language Version to 10 and fix related issues (#15886)

This commit is contained in:
Aditya Patwardhan 2021-08-09 12:21:14 -07:00 committed by GitHub
parent 0a342601c8
commit 2ebac33a78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -136,7 +136,7 @@
<Copyright>(c) Microsoft Corporation.</Copyright>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<LangVersion>10.0</LangVersion>
<PublishReadyToRun Condition=" '$(Configuration)' != 'Debug' ">true</PublishReadyToRun>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@ -144,6 +144,8 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<NeutralLanguage>en-US</NeutralLanguage>
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
<DisableImplicitNamespaceImports_DotNet>true</DisableImplicitNamespaceImports_DotNet>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../signing/visualstudiopublic.snk</AssemblyOriginatorKeyFile>

View file

@ -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"
}