|
28 | 28 | <RestoreProjects Include="Common\GenerateHWIntrinsicTests\GenerateHWIntrinsicTests_Arm.csproj" />
|
29 | 29 | <RestoreProjects Include="Common\GenerateHWIntrinsicTests\GenerateHWIntrinsicTests_General.csproj" />
|
30 | 30 | <RestoreProjects Include="Common\GenerateHWIntrinsicTests\GenerateHWIntrinsicTests_X86.csproj" />
|
31 |
| - <RestoreProjects Include="Common\XUnitLogChecker\XUnitLogChecker.csproj" /> |
| 31 | + <RestoreProjects Include="Common\XUnitLogChecker\XUnitLogChecker.csproj" |
| 32 | + Condition="$(IsXUnitLogCheckerSupported)"> |
| 33 | + <!-- XUnitLogChecker is published as AOT, so it needs the current RID. The RID may change during the build. |
| 34 | + This flag will force restore to use the latest RuntimeIdentifier property. --> |
| 35 | + <ForceRestore>true</ForceRestore> |
| 36 | + </RestoreProjects> |
32 | 37 | <RestoreProjects Include="Common\XUnitWrapperGenerator\XUnitWrapperGenerator.csproj" />
|
33 | 38 | <RestoreProjects Include="Common\XUnitWrapperLibrary\XUnitWrapperLibrary.csproj" />
|
34 | 39 | <RestoreProjects Include="Common\XHarnessRunnerLibrary\XHarnessRunnerLibrary.csproj" />
|
|
542 | 547 |
|
543 | 548 | <!-- restore all csproj's with PackageReferences in one pass -->
|
544 | 549 | <MSBuild Projects="build.proj"
|
545 |
| - Properties="RestoreProj=%(RestoreProjects.Identity)" |
| 550 | + Properties="RestoreProj=%(RestoreProjects.Identity);_ForceRestore=%(RestoreProjects.ForceRestore)" |
546 | 551 | Targets="RestorePackage" />
|
547 | 552 |
|
548 | 553 | <Message Importance="High" Text="[$([System.DateTime]::Now.ToString('HH:mm:ss.ff'))] Restoring all packages...Done." />
|
549 | 554 | </Target>
|
550 | 555 |
|
551 | 556 | <Target Name="RestorePackage">
|
552 | 557 | <PropertyGroup>
|
553 |
| - <_ConfigurationProperties>/p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:Configuration=$(Configuration) /p:CrossBuild=$(CrossBuild) -p:RuntimeIdentifier=$(RuntimeIdentifier)</_ConfigurationProperties> |
| 558 | + <_ConfigurationProperties>/p:TargetOS=$(TargetOS) /p:TargetArchitecture=$(TargetArchitecture) /p:Configuration=$(Configuration) /p:CrossBuild=$(CrossBuild)</_ConfigurationProperties> |
554 | 559 | <_ConfigurationProperties Condition="'$(UseLocalAppHostPack)' == 'true'">$(_ConfigurationProperties) -p:EnableAppHostPackDownload=false -p:EnableTargetingPackDownload=false -p:EnableRuntimePackDownload=false</_ConfigurationProperties>
|
555 |
| - <DotnetRestoreCommand>"$(DotNetTool)" restore $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true $(_ConfigurationProperties)</DotnetRestoreCommand> |
| 560 | + <_ForceRestore Condition="'$(_ForceRestore)' == 'true'">-f</_ForceRestore> |
| 561 | + <DotnetRestoreCommand>"$(DotNetTool)" restore $(_ForceRestore) -r $(RuntimeIdentifier) $(RestoreProj) $(PackageVersionArg) /p:SetTFMForRestore=true $(_ConfigurationProperties)</DotnetRestoreCommand> |
556 | 562 | </PropertyGroup>
|
557 | 563 | <Exec Command="$(DotnetRestoreCommand)"/>
|
558 | 564 | </Target>
|
|
0 commit comments