This lets dotnet pick up RestoreSources hierarchically rather than only use what's predefined in DotnetRestoreCommand (in dir.props).
</Target>
<Target Name="RestoreOptData">
- <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj"
- StandardOutputImportance="Low" />
+ <PropertyGroup>
+ <OptDataRestoreCommand>"$(DotnetToolCommand)"</OptDataRestoreCommand>
+ <OptDataRestoreCommand>$(OptDataRestoreCommand) restore</OptDataRestoreCommand>
+ <OptDataRestoreCommand>$(OptDataRestoreCommand) --packages "$(PackagesDir.TrimEnd('/').TrimEnd('\'))"</OptDataRestoreCommand>
+ </PropertyGroup>
+ <Exec Command="$(OptDataRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj"
+ StandardOutputImportance="Low" />
</Target>
<!--
<RuntimeIdentifiers>win7-x64;win7-x86;linux-x64</RuntimeIdentifiers>
</PropertyGroup>
+ <!-- Add optimization data package restore source. -->
+ <PropertyGroup>
+ <RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'">
+ https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json;
+ $(RestoreSources)
+ </RestoreSources>
+ </PropertyGroup>
+
<ItemGroup>
<PackageReference Include="optimization.PGO.CoreCLR" Version="$(PgoDataPackageVersion)" Condition="'$(PgoDataPackageVersion)'!=''" />
<PackageReference Include="optimization.IBC.CoreCLR" Version="$(IbcDataPackageVersion)" Condition="'$(IbcDataPackageVersion)'!=''" />