Fix restoring internal tools (#24750)
authorElinor Fung <47805090+elinor-fung@users.noreply.github.com>
Thu, 23 May 2019 23:42:08 +0000 (16:42 -0700)
committerAaron Robinson <arobins@microsoft.com>
Thu, 23 May 2019 23:42:08 +0000 (16:42 -0700)
build.cmd
build.proj
build.sh
eng/build-job.yml
src/.nuget/optdata/Directory.Build.props [new file with mode: 0644]
src/.nuget/optdata/ibcmerge.csproj

index b06c369..1d5336f 100644 (file)
--- a/build.cmd
+++ b/build.cmd
@@ -394,10 +394,10 @@ if %__RestoreOptData% EQU 1 (
 
 REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
 set OptDataProjectFilePath=%__ProjectDir%\src\.nuget\optdata\optdata.csproj
-for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /p:ArcadeBuild^=true /nologo') do (
+for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /nologo') do (
     set __PgoOptDataVersion=%%s
 )
-for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /p:ArcadeBuild^=true /nologo') do (
+for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /nologo') do (
     set __IbcOptDataVersion=%%s
 )
 
@@ -646,7 +646,7 @@ if %__BuildCoreLib% EQU 1 (
     if %__IbcOptimize% EQU 1 (
         echo %__MsgPrefix%Commencing IBCMerge of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType%
         set IbcMergeProjectFilePath=%__ProjectDir%\src\.nuget\optdata\ibcmerge.csproj
-        for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /p:ArcadeBuild^=true /nologo') do @(
+        for /f "tokens=*" %%s in ('call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /nologo') do @(
             set __IbcMergeVersion=%%s
         )
 
index f723179..3ccf06d 100644 (file)
@@ -7,7 +7,7 @@
   <Import Project="dir.traversal.targets" />
 
   <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'">
-    <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj /p:ArcadeBuild=true" StandardOutputImportance="Low" />
+    <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj" StandardOutputImportance="Low" />
   </Target>
 
   <Import Project="$(ToolsDir)clean.targets" />
index 2d666c1..b727081 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -160,13 +160,13 @@ restore_optdata()
             fi
         fi
         local OptDataProjectFilePath="$__ProjectRoot/src/.nuget/optdata/optdata.csproj"
-        __PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /p:ArcadeBuild=true /nologo)
+        __PgoOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpPgoDataPackageVersion /nologo)
         if [ $? != 0 ]; then
             echo "Failed to get PGO data package version."
             exit $?
         fi
         __PgoOptDataVersion=$(echo $__PgoOptDataVersion | sed 's/^\s*//')
-        __IbcOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /p:ArcadeBuild=true /nologo)
+        __IbcOptDataVersion=$(DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 $DotNetCli msbuild $OptDataProjectFilePath /t:DumpIbcDataPackageVersion /nologo)
         if [ $? != 0 ]; then
             echo "Failed to get IBC data package version."
             exit $?
index 3c3fa19..9395240 100644 (file)
@@ -114,7 +114,6 @@ jobs:
           displayName: Restore internal tools
           inputs:
             command: restore
-            arguments: /p:ArcadeBuild=true
             feedsToUse: config
             projects: 'src/.nuget/optdata/ibcmerge.csproj'
             nugetConfigPath: 'eng/internal/NuGet.config'
diff --git a/src/.nuget/optdata/Directory.Build.props b/src/.nuget/optdata/Directory.Build.props
new file mode 100644 (file)
index 0000000..496325d
--- /dev/null
@@ -0,0 +1,9 @@
+<Project>
+  <!-- Projects for optdata should all use Arcade  -->
+  <PropertyGroup>
+    <ArcadeBuild>true</ArcadeBuild>
+  </PropertyGroup>
+
+  <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
+
+</Project>
\ No newline at end of file
index b995471..9dae43f 100644 (file)
@@ -15,6 +15,7 @@
 
   <PropertyGroup>
     <RestoreSources>
+      $(RestoreSources);
       https://devdiv.pkgs.visualstudio.com/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json;
     </RestoreSources>
   </PropertyGroup>