From 5f56a5004da04974dd49ab011d669e442be3893f Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Mon, 7 Sep 2020 21:53:25 +0200 Subject: [PATCH] Remove multi-targeting from runtime.depproj (#41666) * Remove multi-targeting from runtime.depproj and convert it to a csproj and use the NoBuild msbuild sdk. Simplify the project logic in relation to IL vs native code as well. --- eng/depProj.common.targets | 5 - eng/depProj.targets | 156 --------------------- eng/restore/repoRestore.targets | 9 +- global.json | 4 +- src/libraries/Directory.Build.props | 3 +- src/libraries/Directory.Build.targets | 2 +- .../runtime/runtime.depproj => externals.csproj} | 78 ++++------- src/libraries/pretest.proj | 18 +-- src/libraries/restore/Directory.Build.props | 23 --- src/libraries/restore/Directory.Build.targets | 7 - .../restore/runtime/Directory.Build.props | 7 - 11 files changed, 47 insertions(+), 265 deletions(-) delete mode 100644 eng/depProj.common.targets delete mode 100644 eng/depProj.targets rename src/libraries/{restore/runtime/runtime.depproj => externals.csproj} (51%) delete mode 100644 src/libraries/restore/Directory.Build.props delete mode 100644 src/libraries/restore/Directory.Build.targets delete mode 100644 src/libraries/restore/runtime/Directory.Build.props diff --git a/eng/depProj.common.targets b/eng/depProj.common.targets deleted file mode 100644 index b6d7360..0000000 --- a/eng/depProj.common.targets +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/eng/depProj.targets b/eng/depProj.targets deleted file mode 100644 index 7cb63b0..0000000 --- a/eng/depProj.targets +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - true - - false - - false - false - - - - ReferenceCopyLocalPaths - - - false - - - None - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - %(NuGetDeploy.SubFolder)%(FileName)%(Extension) - - - - - - - - - - - - - - - - - - - - - - - - - - <_nuGetDeploy Include="@($(NuGetDeploySourceItem))"/> - <_nuGetDeployByFileName Include="@(_nuGetDeploy->'%(FileName)')"> - %(Identity) - - - <_nuGetDeployByFileNameToRemove Include="@(_nuGetDeployByFileName)" Exclude="@(FileToInclude)" Condition="'@(FileToInclude)' != ''" /> - <_filteredNuGetDeployByFileName Include="@(_nuGetDeployByFileName)" Exclude="@(_nuGetDeployByFileNameToRemove);@(FileToExclude)" /> - - <_nuGetDeployByPackageId Include="@(_filteredNuGetDeployByFileName->'%(NuGetPackageId)')" /> - - <_nuGetDeployByPackageIdToRemove Include="@(_nuGetDeployByPackageId)" Exclude="@(PackageToInclude)" Condition="'@(PackageToInclude)' != ''" /> - <_filteredNuGetDeployByPackageId Include="@(_nuGetDeployByPackageId)" Exclude="@(_nuGetDeployByPackageIdToRemove);@(PackageToExclude)" /> - - - - - - - - - - - - diff --git a/eng/restore/repoRestore.targets b/eng/restore/repoRestore.targets index a430b67..d350ef5 100644 --- a/eng/restore/repoRestore.targets +++ b/eng/restore/repoRestore.targets @@ -1,7 +1,7 @@ - Unknown + Unknown @@ -21,12 +21,9 @@ Hack workaround for not restoring each project. Instead, we turn off all the targets that require a `project.assets.json`, since ours will be empty anyway. --> - - + - + - diff --git a/global.json b/global.json index f8d0849..22680d1 100644 --- a/global.json +++ b/global.json @@ -18,7 +18,7 @@ "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20431.4", "Microsoft.FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0", "Microsoft.NET.Sdk.IL": "5.0.0-preview.8.20359.4", - "Microsoft.Build.NoTargets": "1.0.53", - "Microsoft.Build.Traversal": "2.0.52" + "Microsoft.Build.NoTargets": "2.0.1", + "Microsoft.Build.Traversal": "2.1.1" } } diff --git a/src/libraries/Directory.Build.props b/src/libraries/Directory.Build.props index 1a30874..15fa403 100644 --- a/src/libraries/Directory.Build.props +++ b/src/libraries/Directory.Build.props @@ -13,7 +13,6 @@ $(RepositoryEngineeringDir)BeforeTargetFrameworkInference.targets $([System.Text.RegularExpressions.Regex]::IsMatch($(MSBuildProjectDirectory), 'src%24')) true - $(RepositoryEngineeringDir)depProj.common.targets $(LibrariesProjectRoot)OSGroups.json false @@ -284,7 +283,7 @@ - true + true diff --git a/src/libraries/Directory.Build.targets b/src/libraries/Directory.Build.targets index 81ddf6a..33c304f 100644 --- a/src/libraries/Directory.Build.targets +++ b/src/libraries/Directory.Build.targets @@ -265,7 +265,7 @@ - + diff --git a/src/libraries/restore/runtime/runtime.depproj b/src/libraries/externals.csproj similarity index 51% rename from src/libraries/restore/runtime/runtime.depproj rename to src/libraries/externals.csproj index 792cb8f..c05ee43 100644 --- a/src/libraries/restore/runtime/runtime.depproj +++ b/src/libraries/externals.csproj @@ -1,44 +1,47 @@ - + + $(PackageRID) - $(NoWarn);NU1603;NU1605 true + $(NetCoreAppCurrent) + false true false - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser + true + true - + - - - - + + - hostfxr - libhostfxr - hostpolicy - libhostpolicy - true false + - + + + + + @@ -57,19 +60,26 @@ - - + + + + + + + + + @@ -80,30 +90,4 @@ DestinationSubDirectory="include/%(RecursiveDir)" /> - - - - - - - - - - - - - - - - - - - - $([System.Text.RegularExpressions.Regex]::Replace('$(TargetFrameworks)', '-[^;]+', '')) - - diff --git a/src/libraries/pretest.proj b/src/libraries/pretest.proj index 5cd55be..a2b807d 100644 --- a/src/libraries/pretest.proj +++ b/src/libraries/pretest.proj @@ -8,22 +8,22 @@ - - + + - @@ -48,7 +48,7 @@ @@ -63,7 +63,7 @@ @@ -78,7 +78,7 @@ @@ -117,7 +117,7 @@ diff --git a/src/libraries/restore/Directory.Build.props b/src/libraries/restore/Directory.Build.props deleted file mode 100644 index 4cc2380..0000000 --- a/src/libraries/restore/Directory.Build.props +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - $([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', '$(TargetFramework)-$(TargetFrameworkSuffix)-$(Configuration)')) - $([MSBuild]::NormalizeDirectory('$(BaseIntermediateOutputPath)', '$(TargetFramework)-$(Configuration)')) - $(IntermediateOutputPath) - $(RestoreOutputPath)/project.assets.json - $(IntermediateOutputPath) - - true - false - - - - - - Build - - - diff --git a/src/libraries/restore/Directory.Build.targets b/src/libraries/restore/Directory.Build.targets deleted file mode 100644 index 785efcc..0000000 --- a/src/libraries/restore/Directory.Build.targets +++ /dev/null @@ -1,7 +0,0 @@ - - - - - true - - diff --git a/src/libraries/restore/runtime/Directory.Build.props b/src/libraries/restore/runtime/Directory.Build.props deleted file mode 100644 index dacf9d9..0000000 --- a/src/libraries/restore/runtime/Directory.Build.props +++ /dev/null @@ -1,7 +0,0 @@ - - - external.$(MSBuildProjectName) - - - - \ No newline at end of file -- 2.7.4