From 0ba800841b351e2646a5ccee53f46d4a6380463f Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Fri, 26 Oct 2018 16:00:48 -0700 Subject: [PATCH] Ensure build output is still present when crossgen is disabled * Split targets for copying outputs and preparing the crossgen tool * Fix version override check by only looking at the 'pinned' section --- build/SharedFx.targets | 1 + build/tasks/CheckVersionOverrides.cs | 2 +- eng/targets/SharedFx.Common.targets | 52 +++++++++++++++------------- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index f5db4c1b86..f70618067c 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -22,6 +22,7 @@ <_RestoreGraphProjectInput>@(ProjectToBuild) $(SolutionProperties); + SharedFxRid=$(SharedFxRid); DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath); DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath) diff --git a/build/tasks/CheckVersionOverrides.cs b/build/tasks/CheckVersionOverrides.cs index ad75aa8b2b..a510a8b800 100644 --- a/build/tasks/CheckVersionOverrides.cs +++ b/build/tasks/CheckVersionOverrides.cs @@ -24,7 +24,7 @@ namespace RepoTasks var versionOverrides = ProjectRootElement.Open(DotNetPackageVersionPropsPath); var dependencies = ProjectRootElement.Open(DependenciesFile); var pinnedVersions = dependencies.PropertyGroups - .Where(p => !string.Equals("Package Versions: Auto", p.Label)) + .Where(p => string.Equals("Package Versions: Pinned", p.Label)) .SelectMany(p => p.Properties) .ToDictionary(p => p.Name, p => p.Value, StringComparer.OrdinalIgnoreCase); diff --git a/eng/targets/SharedFx.Common.targets b/eng/targets/SharedFx.Common.targets index 6102fa6279..4f83af1176 100644 --- a/eng/targets/SharedFx.Common.targets +++ b/eng/targets/SharedFx.Common.targets @@ -20,20 +20,21 @@ This targets file should only be imported by .shfxproj files. GeneratePublishDependencyFile; GenerateSharedFxDependencyFile; GeneratePublishRuntimeConfigurationFile; - OptimizeOutput; + CopySharedFxToOutput; + CollectSharedFxOutput; PostBuildEvent; GetTargetPath; - + PrepareForCrossGen; CrossGenAssemblies; - + - - $(OptimizeOutputDependsOn); + + $(CollectOutputSharedFxDependsOn); CrossGenSymbols; - + PrepareOutputPaths; @@ -71,9 +72,8 @@ This targets file should only be imported by .shfxproj files. $(IntermediateOutputPath)$(SharedFxRid)\ - - $(OutputPath) - $(IntermediateOutputPath)u\ + + $(IntermediateOutputPath)u\ false @@ -195,14 +195,30 @@ This targets file should only be imported by .shfxproj files. - + - + + + + + + + + + + + + + + + + Microsoft.NETCore.App crossgen @@ -231,15 +247,6 @@ This targets file should only be imported by .shfxproj files. - - - - - - - - - @@ -251,9 +258,6 @@ This targets file should only be imported by .shfxproj files. $(SymbolsOutputPath)%(RecursiveDir) - - -