@@ -73,8 +73,9 @@ if([string]::IsNullOrWhiteSpace($Version))
73
73
#
74
74
Write-Verbose " Setup build configuration."
75
75
$TPB_Solution = " TestPlatform.sln"
76
- $TPB_TestAssets_Solution = Join-Path $env: TP_ROOT_DIR " test\TestAssets\TestAssets.sln"
77
- $TPB_TestAssets_CILAssets = Join-Path $env: TP_ROOT_DIR " test\TestAssets\CILProject\CILProject.proj"
76
+ $TPB_TestAssets = Join-Path $env: TP_ROOT_DIR " test\TestAssets\"
77
+ $TPB_TestAssets_Solution = Join-Path $TPB_TestAssets " TestAssets.sln"
78
+ $TPB_TestAssets_CILAssets = Join-Path $TPB_TestAssets " CILProject\CILProject.proj"
78
79
$TPB_TargetFramework45 = " net45"
79
80
$TPB_TargetFramework451 = " net451"
80
81
$TPB_TargetFramework472 = " net472"
@@ -138,10 +139,16 @@ function Invoke-TestAssetsBuild
138
139
$timer = Start-Timer
139
140
Write-Log " Invoke-TestAssetsBuild: Start test assets build."
140
141
$dotnetExe = Get-DotNetPath
142
+ $nugetExe = Join-Path $env: TP_PACKAGES_DIR - ChildPath " Nuget.CommandLine" | Join-Path - ChildPath $env: NUGET_EXE_Version | Join-Path - ChildPath " tools\NuGet.exe"
143
+ $nugetConfig = Join-Path $TPB_TestAssets " NuGet.config"
141
144
142
145
Write-Log " .. .. Build: Source: $TPB_TestAssets_Solution "
146
+ Write-Log " .. .. Build: Source: $TPB_TestAssets_Solution -- add NuGet source"
147
+ & $nugetExe sources add - Name " locally-built-testplatform-packages" - Source " $env: TP_TESTARTIFACTS \packages\" - ConfigFile " $nugetConfig "
143
148
Write-Verbose " $dotnetExe build $TPB_TestAssets_Solution --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild "
144
149
& $dotnetExe build $TPB_TestAssets_Solution -- configuration $TPB_Configuration - v:minimal - p:CIBuild= $TPB_CIBuild - p:LocalizedBuild= $TPB_LocalizedBuild - bl:" $ ( $env: TP_ROOT_DIR ) \TestAssets.binlog"
150
+ Write-Log " .. .. Build: Source: $TPB_TestAssets_Solution -- remove NuGet source"
151
+ & $nugetExe sources remove - Name " locally-built-testplatform-packages" - ConfigFile " $nugetConfig "
145
152
Write-Log " .. .. Build: Complete."
146
153
147
154
Set-ScriptFailedOnError
@@ -892,9 +899,6 @@ function Get-CoreCLR20TestHostPackageDirectory
892
899
return $ (Join-Path $env: TP_OUT_DIR " $TPB_Configuration \$TPB_TargetFrameworkCore20 \TestHost" )
893
900
}
894
901
895
-
896
-
897
-
898
902
function Locate-MSBuildPath
899
903
{
900
904
$vsInstallPath = Locate- VsInstallPath
0 commit comments