|
26 | 26 | <Delete Files="$(BinDir)System.Private.CoreLib.*" />
|
27 | 27 | </Target>
|
28 | 28 |
|
29 |
| - <Target Name="RestoreOptData"> |
30 |
| - <PropertyGroup> |
31 |
| - <OptDataRestoreCommand>"$(DotnetToolCommand)"</OptDataRestoreCommand> |
32 |
| - <OptDataRestoreCommand>$(OptDataRestoreCommand) restore</OptDataRestoreCommand> |
33 |
| - <OptDataRestoreCommand>$(OptDataRestoreCommand) --packages "$(PackagesDir.TrimEnd('/').TrimEnd('\'))"</OptDataRestoreCommand> |
34 |
| - </PropertyGroup> |
35 |
| - <Exec Command="$(OptDataRestoreCommand) $(SourceDir).nuget/optdata/optdata.csproj" |
36 |
| - StandardOutputImportance="Low" /> |
37 |
| - </Target> |
38 |
| - |
39 | 29 | <!--
|
40 | 30 | BuildTools will conditionally restore additional packages, including IBC tools, using the "RestoreOptionalToolingPackages"
|
41 | 31 | target, which runs automatically before "Sync". Since no "Sync" target actually exists, go ahead and define one now so that
|
42 | 32 | the tools are fetched before "Build".
|
43 | 33 | -->
|
44 |
| - <Target Name="Sync" BeforeTargets="Build" /> |
| 34 | + <Target Name="Sync" BeforeTargets="Build" |
| 35 | + DependsOnTargets="RestoreOptData;RestoreNETCorePlatforms" /> |
45 | 36 |
|
46 |
| - <Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'"> |
| 37 | + <Target Name="RestoreOptData" Condition="'$(RestoreDuringBuild)'=='true' and '$(BuildType)'=='Release'"> |
| 38 | + <PropertyGroup> |
| 39 | + <_OptimizationDataFeed Condition="'$(DotNetBuildOffline)' != 'true'">--source https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</_OptimizationDataFeed> |
| 40 | + </PropertyGroup> |
| 41 | + |
| 42 | + <Exec Command="$(DotnetRestoreCommand) $(_OptimizationDataFeed) $(SourceDir).nuget/optdata/optdata.csproj" |
| 43 | + StandardOutputImportance="Low" /> |
| 44 | + </Target> |
| 45 | + |
| 46 | + <Target Name="RestoreNETCorePlatforms" Condition="'$(RestoreDuringBuild)'=='true'"> |
47 | 47 | <Exec Command="$(DotnetRestoreCommand) $(SourceDir).nuget/init/init.csproj"
|
48 | 48 | StandardOutputImportance="Low" />
|
49 | 49 | </Target>
|
|
52 | 52 | <Message Condition="Exists($(RootBinDir))" Importance="High" Text="Removing $(RootBinDir)"/>
|
53 | 53 | <RemoveDir Directories="$(RootBinDir)" />
|
54 | 54 | </Target>
|
55 |
| - |
| 55 | + |
56 | 56 | </Project>
|
0 commit comments