set IbcDataPackageVersionOutputFile="%__IntermediatesDir%\ibcoptdataversion.txt"
REM Parse the optdata package versions out of msbuild so that we can pass them on to CMake
-call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /nologo %__CommonMSBuildArgs% /p:PgoDataPackageVersionOutputFile=%PgoDataPackageVersionOutputFile%
+call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpPgoDataPackageVersion /nologo %__CommonMSBuildArgs% /p:PgoDataPackageVersionOutputFile="!PgoDataPackageVersionOutputFile!"
if not !errorlevel! == 0 (
echo "Failed to get PGO data package version."
exit /b !errorlevel!
)
-if not exist "%PgoDataPackageVersionOutputFile%" (
+if not exist "!PgoDataPackageVersionOutputFile!" (
echo "Failed to get PGO data package version."
exit /b 1
)
-set /p __PgoOptDataVersion=<"%PgoDataPackageVersionOutputFile%"
+set /p __PgoOptDataVersion=<"!PgoDataPackageVersionOutputFile!"
-call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /nologo %__CommonMSBuildArgs% /p:IbcDataPackageVersionOutputFile=%IbcDataPackageVersionOutputFile%
+call "%__ProjectDir%\dotnet.cmd" msbuild "%OptDataProjectFilePath%" /t:DumpIbcDataPackageVersion /nologo %__CommonMSBuildArgs% /p:IbcDataPackageVersionOutputFile="!IbcDataPackageVersionOutputFile!"
if not !errorlevel! == 0 (
echo "Failed to get IBC data package version."
exit /b !errorlevel!
)
-if not exist "%IbcDataPackageVersionOutputFile%" (
+if not exist "!IbcDataPackageVersionOutputFile!" (
echo "Failed to get IBC data package version."
exit /b 1
)
-set /p __IbcOptDataVersion=<"%IbcDataPackageVersionOutputFile%"
+set /p __IbcOptDataVersion=<"!IbcDataPackageVersionOutputFile!"
REM =========================================================================================
REM ===
echo %__MsgPrefix%Commencing IBCMerge of System.Private.CoreLib for %__BuildOS%.%__BuildArch%.%__BuildType%
set IbcMergeProjectFilePath=%__ProjectDir%\src\.nuget\optdata\ibcmerge.csproj
set IbcMergePackageVersionOutputFile="%__IntermediatesDir%\ibcmergeversion.txt"
- call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /nologo %__CommonMSBuildArgs% /p:IbcMergePackageVersionOutputFile=%IbcMergePackageVersionOutputFile%
+ call "%__ProjectDir%\dotnet.cmd" msbuild "!IbcMergeProjectFilePath!" /t:DumpIbcMergePackageVersion /nologo %__CommonMSBuildArgs% /p:IbcMergePackageVersionOutputFile="!IbcMergePackageVersionOutputFile!"
if not !errorlevel! == 0 (
echo "Failed to determine IBC Merge version."
exit /b !errorlevel!
)
- if not exist "%IbcMergePackageVersionOutputFile%" (
+ if not exist "!IbcMergePackageVersionOutputFile!" (
echo "Failed to determine IBC Merge version."
exit /b 1
)
- set /p __IbcMergeVersion=<"%IbcMergePackageVersionOutputFile%"
+ set /p __IbcMergeVersion=<"!IbcMergePackageVersionOutputFile!"
set IbcMergePath=%__PackagesDir%\microsoft.dotnet.ibcmerge\!__IbcMergeVersion!\tools\netcoreapp2.0\ibcmerge.dll
if exist !IbcMergePath! (
<!-- $(IbcMergePackageVersionOutputFile) -->
<!-- -->
<Target Name="DumpIbcMergePackageVersion">
- <!-- Error if PgoDataPackageVersionOutputFile is not set. -->
+ <!-- Error if IbcMergePackageVersionOutputFile is not set. -->
<Error Condition="'$(IbcMergePackageVersionOutputFile)'==''" Text="IbcMergePackageVersionOutputFile must be passed as a property." />
<!-- Cleanup old version file -->
<Delete Files="$(IbcMergePackageVersionOutputFile)" Condition="Exists('$(IbcMergePackageVersionOutputFile)')" />
- <WriteLinesToFile File="$(IbcMergePackageVersionOutputFile)" Lines="$(optimizationIBCCoreCLRVersion)" Overwrite="true"/>
+ <WriteLinesToFile File="$(IbcMergePackageVersionOutputFile)" Lines="$(IbcMergePackageVersion)" Overwrite="true"/>
<Message Text="IbcMergePackageVersion: $(IbcMergePackageVersion) written to: $(IbcMergePackageVersionOutputFile)" Importance="High" />
</Target>