From 72b58c94d7e3748ace086e0b85885881850de951 Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Tue, 28 Jan 2020 14:32:03 -0800 Subject: [PATCH] Remove RoslynNetCoreTargetFramework Decided to remove the property based approach to specifying a target framework to just specifying `netcoreapp3.1` directly. The reason for this is the following: The advantage of the property is it makes it "easy" to change to a new target framework in the future. That benefit is actually pretty minimal. A simple find and replace operation is **extremely** effective in our code base (it's less key strokes than this message). Hence the benefit is minimal. The downside of the property is that our code doesn't look like customer code. Or rather it diverges from the practices that we publish. In general I prefer to keep our code as standard as possible unless there is a good reason to deviate. There just doesn't seem to be one here. --- eng/targets/Imports.targets | 2 +- eng/targets/Settings.props | 3 +- src/Compilers/CSharp/csc/csc.csproj | 2 +- .../Microsoft.Build.Tasks.CodeAnalysis.csproj | 2 +- .../Server/VBCSCompiler/VBCSCompiler.csproj | 4 +-- .../VBCSCompiler.UnitTests.csproj | 4 +-- ...ysis.VisualBasic.Semantic.UnitTests.vbproj | 2 +- src/Compilers/VisualBasic/vbc/vbc.csproj | 2 +- src/Interactive/csi/csi.csproj | 4 +-- src/Interactive/vbi/vbi.vbproj | 4 +-- ...Microsoft.NETCore.Compilers.Package.csproj | 2 +- .../CoreClrCompilerArtifacts.targets | 28 +++++++++---------- ...osoft.Net.Compilers.Toolset.Package.csproj | 16 +++++------ .../Microsoft.Net.Compilers.Toolset.props | 2 +- .../DevDivInsertionFiles.csproj | 2 +- .../CompilerBenchmarks.csproj | 2 +- .../CompilersBoundTreeGenerator.csproj | 2 +- .../CSharpErrorFactsGenerator.csproj | 2 +- .../CSharpSyntaxGenerator.csproj | 2 +- .../CompilersIOperationGenerator.csproj | 2 +- .../VisualBasicErrorFactsGenerator.vbproj | 2 +- .../VisualBasicSyntaxGenerator.vbproj | 2 +- 22 files changed, 46 insertions(+), 47 deletions(-) diff --git a/eng/targets/Imports.targets b/eng/targets/Imports.targets index 83a015a57f7..e083d89b80d 100644 --- a/eng/targets/Imports.targets +++ b/eng/targets/Imports.targets @@ -11,7 +11,7 @@ Only generate our runtimeconfig.json files for net core apps. It's unnecessary in desktop projects but gets included in lots of output items like VSIX. --> - false + false true $(RepoRoot)build\ToolsetPackages\ - netcoreapp3.1 - net472;$(RoslynNetCoreTargetFramework) + net472;netcoreapp3.1 true true diff --git a/src/Compilers/CSharp/csc/csc.csproj b/src/Compilers/CSharp/csc/csc.csproj index f69a2d7dc3e..d4ae4af9756 100644 --- a/src/Compilers/CSharp/csc/csc.csproj +++ b/src/Compilers/CSharp/csc/csc.csproj @@ -17,7 +17,7 @@ - + diff --git a/src/Compilers/Core/MSBuildTask/Microsoft.Build.Tasks.CodeAnalysis.csproj b/src/Compilers/Core/MSBuildTask/Microsoft.Build.Tasks.CodeAnalysis.csproj index cf059484e20..ed371546c2a 100644 --- a/src/Compilers/Core/MSBuildTask/Microsoft.Build.Tasks.CodeAnalysis.csproj +++ b/src/Compilers/Core/MSBuildTask/Microsoft.Build.Tasks.CodeAnalysis.csproj @@ -61,7 +61,7 @@ - + diff --git a/src/Compilers/Server/VBCSCompiler/VBCSCompiler.csproj b/src/Compilers/Server/VBCSCompiler/VBCSCompiler.csproj index 0f733724082..b40e2e8a9d7 100644 --- a/src/Compilers/Server/VBCSCompiler/VBCSCompiler.csproj +++ b/src/Compilers/Server/VBCSCompiler/VBCSCompiler.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj b/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj index c320802784b..23b5d124abb 100644 --- a/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj +++ b/src/Compilers/Server/VBCSCompilerTests/VBCSCompiler.UnitTests.csproj @@ -29,8 +29,8 @@ - - + + diff --git a/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj b/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj index c039915b438..5fa773ca23e 100644 --- a/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj +++ b/src/Compilers/VisualBasic/Test/Semantic/Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests.vbproj @@ -28,7 +28,7 @@ - + diff --git a/src/Compilers/VisualBasic/vbc/vbc.csproj b/src/Compilers/VisualBasic/vbc/vbc.csproj index 816c3ac5025..ba81a55898f 100644 --- a/src/Compilers/VisualBasic/vbc/vbc.csproj +++ b/src/Compilers/VisualBasic/vbc/vbc.csproj @@ -16,7 +16,7 @@ - + diff --git a/src/Interactive/csi/csi.csproj b/src/Interactive/csi/csi.csproj index 2dbe02a4273..725103b7bba 100644 --- a/src/Interactive/csi/csi.csproj +++ b/src/Interactive/csi/csi.csproj @@ -18,11 +18,11 @@ - + csi.rsp PreserveNewest - + csi.rsp PreserveNewest diff --git a/src/Interactive/vbi/vbi.vbproj b/src/Interactive/vbi/vbi.vbproj index e3488c3e7a2..b4766aa25ef 100644 --- a/src/Interactive/vbi/vbi.vbproj +++ b/src/Interactive/vbi/vbi.vbproj @@ -19,11 +19,11 @@ - + vbi.rsp PreserveNewest - + vbi.rsp PreserveNewest diff --git a/src/NuGet/Microsoft.NETCore.Compilers/Microsoft.NETCore.Compilers.Package.csproj b/src/NuGet/Microsoft.NETCore.Compilers/Microsoft.NETCore.Compilers.Package.csproj index 3b95e135cc0..a7802b01f5f 100644 --- a/src/NuGet/Microsoft.NETCore.Compilers/Microsoft.NETCore.Compilers.Package.csproj +++ b/src/NuGet/Microsoft.NETCore.Compilers/Microsoft.NETCore.Compilers.Package.csproj @@ -1,7 +1,7 @@  - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 true Microsoft.NETCore.Compilers diff --git a/src/NuGet/Microsoft.Net.Compilers.Toolset/CoreClrCompilerArtifacts.targets b/src/NuGet/Microsoft.Net.Compilers.Toolset/CoreClrCompilerArtifacts.targets index 5201079767d..604caf83f36 100644 --- a/src/NuGet/Microsoft.Net.Compilers.Toolset/CoreClrCompilerArtifacts.targets +++ b/src/NuGet/Microsoft.Net.Compilers.Toolset/CoreClrCompilerArtifacts.targets @@ -3,9 +3,9 @@ - - - + + + @@ -16,23 +16,23 @@ - - - + + + - - - + + + - - - + + + - - + + diff --git a/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj b/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj index 60f50b9f82b..88954e878e7 100644 --- a/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj +++ b/src/NuGet/Microsoft.Net.Compilers.Toolset/Microsoft.Net.Compilers.Toolset.Package.csproj @@ -24,7 +24,7 @@ $(NoWarn);NU5100;NU5128 <_DependsOn Condition="'$(TargetFramework)' == 'net472'">InitializeDesktopCompilerArtifacts - <_DependsOn Condition="'$(TargetFramework)' == '$(RoslynNetCoreTargetFramework)'">InitializeCoreClrCompilerArtifacts + <_DependsOn Condition="'$(TargetFramework)' == 'netcoreapp3.1'">InitializeCoreClrCompilerArtifacts @@ -38,18 +38,18 @@ Targets="Publish" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" - Condition="'$(TargetFramework)' == '$(RoslynNetCoreTargetFramework)'" - SetTargetFramework="TargetFramework=$(RoslynNetCoreTargetFramework)" /> + Condition="'$(TargetFramework)' == 'netcoreapp3.1'" + SetTargetFramework="TargetFramework=netcoreapp3.1" /> <_File Include="@(DesktopCompilerArtifact)" TargetDir="tasks/net472"/> <_File Include="@(DesktopCompilerResourceArtifact)" TargetDir="tasks/net472"/> - <_File Include="@(CoreClrCompilerBuildArtifact)" TargetDir="tasks/$(RoslynNetCoreTargetFramework)"/> - <_File Include="@(CoreClrCompilerToolsArtifact)" TargetDir="tasks/$(RoslynNetCoreTargetFramework)"/> - <_File Include="@(CoreClrCompilerBinArtifact)" TargetDir="tasks/$(RoslynNetCoreTargetFramework)/bincore"/> - <_File Include="@(CoreClrCompilerBinRuntimesArtifact)" TargetDir="tasks/$(RoslynNetCoreTargetFramework)/bincore/runtimes"/> + <_File Include="@(CoreClrCompilerBuildArtifact)" TargetDir="tasks/netcoreapp3.1"/> + <_File Include="@(CoreClrCompilerToolsArtifact)" TargetDir="tasks/netcoreapp3.1"/> + <_File Include="@(CoreClrCompilerBinArtifact)" TargetDir="tasks/netcoreapp3.1/bincore"/> + <_File Include="@(CoreClrCompilerBinRuntimesArtifact)" TargetDir="tasks/netcoreapp3.1/bincore/runtimes"/> <_File Include="$(MSBuildProjectDirectory)\build\**\*.*" Condition="'$(TargetFramework)' == 'net472'" TargetDir="build" /> @@ -58,5 +58,5 @@ - + diff --git a/src/NuGet/Microsoft.Net.Compilers.Toolset/build/Microsoft.Net.Compilers.Toolset.props b/src/NuGet/Microsoft.Net.Compilers.Toolset/build/Microsoft.Net.Compilers.Toolset.props index d7923ead0ce..157388e0be7 100644 --- a/src/NuGet/Microsoft.Net.Compilers.Toolset/build/Microsoft.Net.Compilers.Toolset.props +++ b/src/NuGet/Microsoft.Net.Compilers.Toolset/build/Microsoft.Net.Compilers.Toolset.props @@ -2,7 +2,7 @@ - <_RoslynTargetDirectoryName Condition="'$(MSBuildRuntimeType)' == 'Core'">$(RoslynNetCoreTargetFramework) + <_RoslynTargetDirectoryName Condition="'$(MSBuildRuntimeType)' == 'Core'">netcoreapp3.1 <_RoslynTargetDirectoryName Condition="'$(MSBuildRuntimeType)' != 'Core'">net472 <_RoslynTasksDirectory>$(MSBuildThisFileDirectory)..\tasks\$(_RoslynTargetDirectoryName)\ $(_RoslynTasksDirectory)Microsoft.Build.Tasks.CodeAnalysis.dll diff --git a/src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj b/src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj index 8b9e51612ba..73aff4ee4e1 100644 --- a/src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj +++ b/src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj @@ -4,7 +4,7 @@ <_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' != 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\net472\Microsoft.DotNet.NuGetRepack.Tasks.dll - <_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\$(RoslynNetCoreTargetFramework)\Microsoft.DotNet.NuGetRepack.Tasks.dll + <_NuGetRepackAssembly Condition="'$(MSBuildRuntimeType)' == 'Core'">$(NuGetPackageRoot)microsoft.dotnet.nugetrepack.tasks\$(MicrosoftDotnetNuGetRepackTasksVersion)\tools\netcoreapp3.1\Microsoft.DotNet.NuGetRepack.Tasks.dll diff --git a/src/Tools/CompilerBenchmarks/CompilerBenchmarks.csproj b/src/Tools/CompilerBenchmarks/CompilerBenchmarks.csproj index fa280b06289..72fe95584cc 100644 --- a/src/Tools/CompilerBenchmarks/CompilerBenchmarks.csproj +++ b/src/Tools/CompilerBenchmarks/CompilerBenchmarks.csproj @@ -4,7 +4,7 @@ Exe - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 false diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj index 71ca3c7d2c0..e530a448ab8 100644 --- a/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj +++ b/src/Tools/Source/CompilerGeneratorTools/Source/BoundTreeGenerator/CompilersBoundTreeGenerator.csproj @@ -9,7 +9,7 @@ Roslyn.Compilers.Internal.BoundTreeGenerator BoundTreeGenerator True - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 false diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj index c31ff9e97b8..612b2a75ab3 100644 --- a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj +++ b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpErrorFactsGenerator/CSharpErrorFactsGenerator.csproj @@ -8,7 +8,7 @@ Exe Roslyn.Compilers.CSharp.Internal.CSharpErrorFactsGenerator True - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 false \ No newline at end of file diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj index 4aab8726ce8..b286d56755c 100644 --- a/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj +++ b/src/Tools/Source/CompilerGeneratorTools/Source/CSharpSyntaxGenerator/CSharpSyntaxGenerator.csproj @@ -8,7 +8,7 @@ Exe Roslyn.Compilers.CSharp.Internal.CSharpSyntaxGenerator True - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 $(RoslynPortableRuntimeIdentifiers) false diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj b/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj index 6fd180de9b2..96fcb657ae1 100644 --- a/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj +++ b/src/Tools/Source/CompilerGeneratorTools/Source/IOperationGenerator/CompilersIOperationGenerator.csproj @@ -6,7 +6,7 @@ Roslyn.Compilers.Internal.IOperationGenerator IOperationGenerator True - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 false enable diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj index 82457f588b4..fc87c6ecadb 100644 --- a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj +++ b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicErrorFactsGenerator/VisualBasicErrorFactsGenerator.vbproj @@ -10,7 +10,7 @@ Microsoft.CodeAnalysis.VisualBasic.Internal.VBErrorFactsGenerator VBErrorFactsGenerator True - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 false \ No newline at end of file diff --git a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj index 486d3d1815c..610a49ca0ea 100644 --- a/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj +++ b/src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VisualBasicSyntaxGenerator.vbproj @@ -11,7 +11,7 @@ VBSyntaxGenerator Off True - $(RoslynNetCoreTargetFramework) + netcoreapp3.1 false -- GitLab