Reuse the shared NuGet package cache
This commit is contained in:
+1
-1
@@ -6,4 +6,4 @@ Run the complete BusinessMgr validation:
|
||||
.\eng\validate.ps1
|
||||
```
|
||||
|
||||
Use `-SkipRestore` when packages are already restored. The script suppresses .NET first-run setup and banners, locates Visual Studio MSBuild because the Portal test project requires Visual Studio SSDT targets, builds serially, derives test output paths from each project's target framework, runs both test assemblies, stores test output under the ignored `TestResults/Validation` folder, checks the Git diff, and verifies working-tree line endings without modifying files.
|
||||
Use `-SkipRestore` when packages are already restored. The script suppresses .NET first-run setup and banners, locates Visual Studio MSBuild because the Portal test project requires Visual Studio SSDT targets, builds serially, derives test output paths from each project's target framework, runs both test assemblies, stores test output under the ignored `TestResults/Validation` folder, checks the Git diff, and verifies working-tree line endings without modifying files. Its isolated `DOTNET_CLI_HOME` stores only CLI state; NuGet packages reuse `NUGET_PACKAGES` when already configured or the user's standard `.nuget/packages` cache.
|
||||
|
||||
@@ -7,12 +7,14 @@ $ErrorActionPreference = 'Stop'
|
||||
$repositoryRoot = Split-Path -Parent $PSScriptRoot
|
||||
$testResultsPath = Join-Path $repositoryRoot 'TestResults\Validation'
|
||||
$dotnetHome = Join-Path (Split-Path -Parent $repositoryRoot) '.dotnet-cli-validation'
|
||||
$nugetPackagesPath = if ($env:NUGET_PACKAGES) { $env:NUGET_PACKAGES } else { Join-Path $env:USERPROFILE '.nuget\packages' }
|
||||
|
||||
$env:DOTNET_CLI_HOME = $dotnetHome
|
||||
$env:DOTNET_GENERATE_ASPNET_CERTIFICATE = 'false'
|
||||
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = '1'
|
||||
$env:DOTNET_CLI_TELEMETRY_OPTOUT = '1'
|
||||
$env:DOTNET_NOLOGO = '1'
|
||||
$env:NUGET_PACKAGES = $nugetPackagesPath
|
||||
|
||||
function Invoke-External
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user