From d236fafc75a6d2b3463c6506ae7d9fa10b7da39d Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Fri, 5 Jun 2020 15:13:28 -0500 Subject: [PATCH] Allow individual projects to override LangVersion Setting LangVersion in a .targets file makes it hard to override LangVersion in individual projects. Instead, move the default project setting back to the .props file and condition VB based on $(MSBuildProjectExtension), which is available in the .props file. ILCompiler.Reflection.ReadyToRun needs to set LangVersion to 7.3 so it doesn't break ILSpy. Fix #37498 --- Directory.Build.props | 3 +++ Directory.Build.targets | 7 ------- .../ILCompiler.Reflection.ReadyToRun.csproj | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 70d6c03f17741a..13aff82cb7724f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -86,6 +86,9 @@ + + preview + latest true diff --git a/Directory.Build.targets b/Directory.Build.targets index 2d72cd0f912847..f16e04d9b4e278 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -20,11 +20,4 @@ $(MajorVersion).$(MinorVersion) - - - - preview - latest - - diff --git a/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj b/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj index f07c29c417b97b..02f0d8e08038bb 100644 --- a/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj +++ b/src/coreclr/src/tools/crossgen2/ILCompiler.Reflection.ReadyToRun/ILCompiler.Reflection.ReadyToRun.csproj @@ -14,6 +14,7 @@ $(BinDir) AnyCPU;x64 AnyCPU + 7.3