<Delete Files="$(BinDir)System.Private.CoreLib.*" />
</Target>
- <Target Name="RestoreOptData">
+ <!--
+ BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
+ target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
+ the tools are fetched before "Build".
+ -->
+ <Target Name="Sync" BeforeTargets="Build"
+ DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" />
+
+ <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'">
<PropertyGroup>
<_OptimizationDataFeed Condition="'$(DotNetBuildOffline)' != 'true'">--source https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</_OptimizationDataFeed>
</PropertyGroup>
StandardOutputImportance="Low" />
</Target>
- <!--
- BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
- target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
- the tools are fetched before "Build".
- -->
- <Target Name="Sync" BeforeTargets="Build" />
-
- <Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'">
+ <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'">
<Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
StandardOutputImportance="Low" />
</Target>