Set LangVersion the same way as roslyn (dotnet/aspnetcore-tooling#979)

* Set LangVersion the same way as roslyn

* Update commit link
\n\nCommit migrated from b82d4f9583
This commit is contained in:
Ajay Bhargav Baaskaran 2019-08-15 15:27:12 -07:00 committed by GitHub
parent f3536ca403
commit 2873952822
2 changed files with 5 additions and 11 deletions

View File

@ -13,7 +13,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<Project ToolsVersion="14.0">
<!--
What follows in this file is based on:
https://github.com/dotnet/roslyn/blob/db4f836b97db1e7ad261e51c67cc80c6f3c28791/src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
https://github.com/dotnet/roslyn/blob/21263069b7e8522441d829fc59a3aa5b3a3cf938/src/Compilers/Core/MSBuildTask/Microsoft.CSharp.Core.targets
We need to keep this basically up to date, as well as track the set of modifications we've made. Try to keep the formatting
similar to the original to reduce noise. In general try to only deviate from the CoreCompile target when we need to for
@ -111,10 +111,10 @@ Copyright (c) .NET Foundation. All rights reserved.
<UseSharedCompilation>true</UseSharedCompilation>
</PropertyGroup>
<PropertyGroup>
<LangVersion Condition="'$(LangVersion)' == '' AND
(('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(TargetFrameworkVersion)' == 'v3.0') OR
('$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(TargetFrameworkVersion)' == 'v2.1'))">preview</LangVersion>
<PropertyGroup Condition="('$(TargetFrameworkIdentifier)' != '.NETCoreApp' OR '$(TargetFrameworkVersion)' != 'v3.0') AND
('$(TargetFrameworkIdentifier)' != '.NETStandard' OR '$(TargetFrameworkVersion)' != 'v2.1')">
<MaxSupportedLangVersion Condition="'$(MaxSupportedLangVersion)' == ''">7.3</MaxSupportedLangVersion>
<LangVersion Condition="'$(LangVersion)' == ''">$(MaxSupportedLangVersion)</LangVersion>
</PropertyGroup>
<Csc

View File

@ -180,12 +180,6 @@ Copyright (c) .NET Foundation. All rights reserved.
<UseSharedCompilation>true</UseSharedCompilation>
</PropertyGroup>
<PropertyGroup>
<LangVersion Condition="'$(LangVersion)' == '' AND
(('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(TargetFrameworkVersion)' == 'v3.0') OR
('$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(TargetFrameworkVersion)' == 'v2.1'))">8.0</LangVersion>
</PropertyGroup>
<Csc
AdditionalLibPaths="$(AdditionalLibPaths)"
AddModules="@(AddModules)"