@@ -73,8 +73,9 @@ if([string]::IsNullOrWhiteSpace($Version))
7373#
7474Write-Verbose " Setup build configuration."
7575$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"
7879$TPB_TargetFramework45 = " net45"
7980$TPB_TargetFramework451 = " net451"
8081$TPB_TargetFramework472 = " net472"
@@ -138,10 +139,16 @@ function Invoke-TestAssetsBuild
138139 $timer = Start-Timer
139140 Write-Log " Invoke-TestAssetsBuild: Start test assets build."
140141 $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"
141144
142145 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 "
143148 Write-Verbose " $dotnetExe build $TPB_TestAssets_Solution --configuration $TPB_Configuration -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild "
144149 & $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 "
145152 Write-Log " .. .. Build: Complete."
146153
147154 Set-ScriptFailedOnError
@@ -892,9 +899,6 @@ function Get-CoreCLR20TestHostPackageDirectory
892899 return $ (Join-Path $env: TP_OUT_DIR " $TPB_Configuration \$TPB_TargetFrameworkCore20 \TestHost" )
893900}
894901
895-
896-
897-
898902function Locate-MSBuildPath
899903{
900904 $vsInstallPath = Locate- VsInstallPath
0 commit comments