From 55c8588326a5516018752ea88332b5b514e020ed Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Mon, 6 Apr 2020 16:48:09 -0700 Subject: [PATCH 01/20] Updating VS component installer to be more verbose --- vnext/Scripts/Tfs/Install-VSFeatures.ps1 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 index 790d32c7838..1184a9f4296 100644 --- a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 +++ b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 @@ -12,6 +12,8 @@ param ( [switch] $Collect ) +Write-Host "Downloading web installer..." + Invoke-WebRequest -Method Get ` -Uri $InstallerUri ` -OutFile $VsInstaller @@ -24,26 +26,32 @@ $VsInstallOutputDir = "${env:System_DefaultWorkingDirectory}\vs" New-Item -ItemType directory -Path $VsInstallOutputDir +Write-Host "Running web installer to download components..." + Start-Process ` -FilePath "$VsInstaller" ` -ArgumentList ( ` '--layout', "$VsInstallOutputDir", '--wait', '--norestart', + '--verbose', '--quiet' + ` $componentList ) ` -Wait ` -PassThru +Write-Host "Running actual VS installer..." + Start-Process ` -FilePath "$VsInstallOutputDir\vs_Enterprise.exe" ` -ArgumentList ( 'modify', '--installPath', "`"$VsInstallPath`"" , '--wait', - '--quiet', - '--norestart' + ` + '--norestart' + '--verbose', + '--quiet' + ` $componentList ) ` -Wait ` From 41684633d539395ed3b5f9163b57ec6ae771e77c Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Mon, 6 Apr 2020 17:09:18 -0700 Subject: [PATCH 02/20] Fix comma --- vnext/Scripts/Tfs/Install-VSFeatures.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 index 1184a9f4296..59a5d371ac7 100644 --- a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 +++ b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 @@ -49,7 +49,7 @@ Start-Process ` 'modify', '--installPath', "`"$VsInstallPath`"" , '--wait', - '--norestart' + '--norestart', '--verbose', '--quiet' + ` $componentList From 6a189e3fa78c28af8224922b94372a08ebeb20cf Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Mon, 6 Apr 2020 17:12:44 -0700 Subject: [PATCH 03/20] Remove vm check --- .ado/templates/prepare-env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index b425c1670a6..69b22ba063d 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -54,7 +54,7 @@ steps: -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} -Collect:$${{ parameters.debug }} - condition: and(ne('${{ parameters.vsComponents }}', ''), eq(variables['VmImage'], 'windows-2019')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty + condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty - task: PowerShell@2 displayName: List disksize after prepare-env From 029489788c3244195074032d02124bab5a3ba015 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 10:59:08 -0700 Subject: [PATCH 04/20] Added option to use local installer to install VS components --- vnext/Scripts/Tfs/Install-VSFeatures.ps1 | 101 ++++++++++++++--------- 1 file changed, 60 insertions(+), 41 deletions(-) diff --git a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 index 59a5d371ac7..13c0070c7b2 100644 --- a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 +++ b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 @@ -9,54 +9,73 @@ param ( [System.IO.FileInfo] $VsInstallPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Enterprise", - [switch] $Collect -) + [System.IO.FileInfo] $VsInstallerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer", -Write-Host "Downloading web installer..." + [switch] $Collect -Invoke-WebRequest -Method Get ` - -Uri $InstallerUri ` - -OutFile $VsInstaller + [switch] $UseWebInstaller = $true +) $Components | ForEach-Object { $componentList += '--add', $_ } -$VsInstallOutputDir = "${env:System_DefaultWorkingDirectory}\vs" - -New-Item -ItemType directory -Path $VsInstallOutputDir - -Write-Host "Running web installer to download components..." - -Start-Process ` - -FilePath "$VsInstaller" ` - -ArgumentList ( ` - '--layout', "$VsInstallOutputDir", - '--wait', - '--norestart', - '--verbose', - '--quiet' + ` - $componentList - ) ` - -Wait ` - -PassThru - -Write-Host "Running actual VS installer..." - -Start-Process ` - -FilePath "$VsInstallOutputDir\vs_Enterprise.exe" ` - -ArgumentList ( - 'modify', - '--installPath', "`"$VsInstallPath`"" , - '--wait', - '--norestart', - '--verbose', - '--quiet' + ` - $componentList - ) ` - -Wait ` - -PassThru ` - -OutVariable returnCode +if ($UseWebInstaller) { + Write-Host "Downloading web installer..." + + Invoke-WebRequest -Method Get ` + -Uri $InstallerUri ` + -OutFile $VsInstaller + + $VsInstallOutputDir = "${env:System_DefaultWorkingDirectory}\vs" + + New-Item -ItemType directory -Path $VsInstallOutputDir + + Write-Host "Running web installer to download requested components..." + + Start-Process ` + -FilePath "$VsInstaller" ` + -ArgumentList ( ` + '--layout', "$VsInstallOutputDir", + '--wait', + '--norestart', + '--quiet' + ` + $componentList + ) ` + -Wait + + Write-Host "Running VS installer to add requested components..." + + Start-Process ` + -FilePath "$VsInstallOutputDir\vs_Enterprise.exe" ` + -ArgumentList ( + 'modify', + '--installPath', "`"$VsInstallPath`"" , + '--wait', + '--norestart', + '--quiet' + ` + $componentList + ) ` + -Wait ` + -OutVariable returnCode + + Remove-Item --path $VsInstallOutputDir + +} else { + Write-Host "Using local installer..." + + Start-Process ` + -FilePath "$VsInstallerPath\vs_installershell.exe" ` + -ArgumentList ( + 'modify', + '--installPath', "`"$VsInstallPath`"" , + '--norestart', + '--quiet' + ` + $componentList + ) ` + -Wait ` + -OutVariable returnCode +} if ($Collect) { Invoke-WebRequest -Method Get ` From c66d751270becb228a46fde6ec5be352a2855ca2 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 11:02:44 -0700 Subject: [PATCH 05/20] Remove vm image check in rn init --- .ado/templates/react-native-init.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index aec572f4ef7..be29935aea4 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -88,7 +88,7 @@ steps: arguments: -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} - condition: and(ne('${{ parameters.vsComponents }}', ''), eq(variables['VmImage'], 'windows-2019')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty + condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty - task: VSBuild@1 displayName: VSBuild - testcli From 031c8d86cf72ae810704df3c5889503558676500 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 11:04:04 -0700 Subject: [PATCH 06/20] Set rn init to use local installer --- .ado/templates/react-native-init.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index be29935aea4..b0ab2a65ebe 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -88,6 +88,7 @@ steps: arguments: -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} + -UseWebInstaller:$false condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty - task: VSBuild@1 From 11935863675a711869050a073e795c9306458646 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 11:49:02 -0700 Subject: [PATCH 07/20] Added cleanup, default to using local installer --- .ado/templates/prepare-env.yml | 2 ++ .ado/templates/react-native-init.yml | 1 + vnext/Scripts/Tfs/Install-VSFeatures.ps1 | 19 ++++++++++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index 69b22ba063d..a89cd6ad729 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -54,6 +54,8 @@ steps: -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} -Collect:$${{ parameters.debug }} + -Cleanup:$true + -UseWebInstaller:$false condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty - task: PowerShell@2 diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index b0ab2a65ebe..2b6d42a4c1b 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -88,6 +88,7 @@ steps: arguments: -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} + -Cleanup:$true -UseWebInstaller:$false condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty diff --git a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 index 13c0070c7b2..99dbf0e5c13 100644 --- a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 +++ b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 @@ -7,11 +7,15 @@ param ( [string] $VsInstaller = "${env:System_DefaultWorkingDirectory}\vs_Enterprise.exe", + [string] $VsInstallOutputDir = "${env:System_DefaultWorkingDirectory}\vs", + [System.IO.FileInfo] $VsInstallPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Enterprise", [System.IO.FileInfo] $VsInstallerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer", - [switch] $Collect + [switch] $Collect = $false, + + [switch] $Cleanup = $false, [switch] $UseWebInstaller = $true ) @@ -27,8 +31,6 @@ if ($UseWebInstaller) { -Uri $InstallerUri ` -OutFile $VsInstaller - $VsInstallOutputDir = "${env:System_DefaultWorkingDirectory}\vs" - New-Item -ItemType directory -Path $VsInstallOutputDir Write-Host "Running web installer to download requested components..." @@ -42,7 +44,8 @@ if ($UseWebInstaller) { '--quiet' + ` $componentList ) ` - -Wait + -Wait ` + -PassThru Write-Host "Running VS installer to add requested components..." @@ -57,9 +60,15 @@ if ($UseWebInstaller) { $componentList ) ` -Wait ` + -PassThru ` -OutVariable returnCode - Remove-Item --path $VsInstallOutputDir + if ($Cleanup) { + Write-Host "Cleaning up..." + + Remove-Item -Path $VsInstaller + Remove-Item -Path $VsInstallOutputDir -Recurse + } } else { Write-Host "Using local installer..." From da804132ece62815e48cff1556208b42204f8cd5 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 11:57:28 -0700 Subject: [PATCH 08/20] Default to web installer if local installer isn't available --- .ado/templates/prepare-env.yml | 1 - .ado/templates/react-native-init.yml | 1 - vnext/Scripts/Tfs/Install-VSFeatures.ps1 | 8 ++++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index a89cd6ad729..5524a031af4 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -55,7 +55,6 @@ steps: -Components ${{ parameters.vsComponents }} -Collect:$${{ parameters.debug }} -Cleanup:$true - -UseWebInstaller:$false condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty - task: PowerShell@2 diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index 2b6d42a4c1b..c35e8c25706 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -89,7 +89,6 @@ steps: -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} -Cleanup:$true - -UseWebInstaller:$false condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty - task: VSBuild@1 diff --git a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 index 99dbf0e5c13..fc79f7f0349 100644 --- a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 +++ b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 @@ -17,13 +17,17 @@ param ( [switch] $Cleanup = $false, - [switch] $UseWebInstaller = $true + [switch] $UseWebInstaller = $false ) $Components | ForEach-Object { $componentList += '--add', $_ } +$LocalVsInstaller = "$VsInstallerPath\vs_installershell.exe" + +$UseWebInstaller = $UseWebInstaller -or -not (Test-Path -Path "$LocalVsInstaller") + if ($UseWebInstaller) { Write-Host "Downloading web installer..." @@ -74,7 +78,7 @@ if ($UseWebInstaller) { Write-Host "Using local installer..." Start-Process ` - -FilePath "$VsInstallerPath\vs_installershell.exe" ` + -FilePath "$LocalVsInstaller" ` -ArgumentList ( 'modify', '--installPath', "`"$VsInstallPath`"" , From 9bd6cb6cbbc2f07da9abfd63cdea13223aff3fa1 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 12:05:16 -0700 Subject: [PATCH 09/20] Fix vscomponents parameters --- .ado/templates/prepare-env.yml | 3 ++- .ado/templates/react-native-init.yml | 3 ++- .ado/windows-vs-pr.yml | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index 5524a031af4..315bbe560b1 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -7,6 +7,7 @@ parameters: # Visual Studio Installer vsInstallerUri: $(VsInstallerUri) vsComponents: '' + installVsComponents: false steps: - task: PowerShell@2 @@ -55,7 +56,7 @@ steps: -Components ${{ parameters.vsComponents }} -Collect:$${{ parameters.debug }} -Cleanup:$true - condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty + condition: and(succeeded(), ${{ parameters.installVsComponents }}) - task: PowerShell@2 displayName: List disksize after prepare-env diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index c35e8c25706..8e7209d39a5 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -5,6 +5,7 @@ parameters: platform: configuration: vsComponents: '' + installVsComponents: false vsInstallerUri: $(VsInstallerUri) steps: @@ -89,7 +90,7 @@ steps: -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} -Cleanup:$true - condition: and(ne('${{ parameters.vsComponents }}', '')) # Note that this is evaluated at parsing, so parameters.vsComponents is never empty + condition: and(succeeded(), ${{ parameters.installVsComponents }}) - task: VSBuild@1 displayName: VSBuild - testcli diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index 496465bc729..2310db963f3 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -71,6 +71,7 @@ jobs: yarnBuildCmd: build project: vnext/ReactWindows-Universal.sln vsComponents: $(VsComponents) + installVsComponents: true - task: VSTest@2 displayName: Run Universal Unit Tests @@ -124,6 +125,7 @@ jobs: - template: templates/prepare-env.yml parameters: vsComponents: $(VsComponents) + installVsComponents: true yarnBuildCmd: build - task: NuGetCommand@2 @@ -227,6 +229,7 @@ jobs: - template: templates/prepare-env.yml parameters: vsComponents: $(VsComponents) + installVsComponents: true yarnBuildCmd: build - task: NuGetCommand@2 @@ -482,6 +485,7 @@ jobs: platform: $(platform) version: 0.61.5 vsComponents: $(VsComponents) + installVsComponents: true - job: RNWExtraChecks displayName: Extra Checks From fcf16ae4ef74bcab52ddccc5a62dbc132ffc88da Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 12:17:48 -0700 Subject: [PATCH 10/20] Added missing installvscomponents --- .ado/templates/e2e-test-job.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.ado/templates/e2e-test-job.yml b/.ado/templates/e2e-test-job.yml index a222ac53ee0..4b0965a9821 100644 --- a/.ado/templates/e2e-test-job.yml +++ b/.ado/templates/e2e-test-job.yml @@ -45,6 +45,7 @@ jobs: - template: prepare-env.yml parameters: vsComponents: $(VsComponents) + installVsComponents: true yarnBuildCmd: build - task: NuGetCommand@2 From cc6651499b67a993e7e4391291e689897cb7fca2 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 12:18:49 -0700 Subject: [PATCH 11/20] Change files --- ...-native-windows-2020-04-07-12-18-49-reduceinstall.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 change/react-native-windows-2020-04-07-12-18-49-reduceinstall.json diff --git a/change/react-native-windows-2020-04-07-12-18-49-reduceinstall.json b/change/react-native-windows-2020-04-07-12-18-49-reduceinstall.json new file mode 100644 index 00000000000..1bdbfdf483e --- /dev/null +++ b/change/react-native-windows-2020-04-07-12-18-49-reduceinstall.json @@ -0,0 +1,8 @@ +{ + "type": "prerelease", + "comment": "Optimizing VS component installer to speed up CI builds", + "packageName": "react-native-windows", + "email": "jthysell@microsoft.com", + "dependentChangeType": "patch", + "date": "2020-04-07T19:18:49.438Z" +} \ No newline at end of file From 118ee4a4d83366b348c8057e171ffe018068a75e Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 12:24:16 -0700 Subject: [PATCH 12/20] Include vs installer path in script --- .ado/templates/prepare-env.yml | 2 -- .ado/templates/react-native-init.yml | 2 -- .ado/variables/msbuild.yml | 3 +-- .ado/variables/vs2019.yml | 1 + vnext/Scripts/Tfs/Install-VSFeatures.ps1 | 7 +++---- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index 315bbe560b1..28175fee6b3 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -5,7 +5,6 @@ parameters: debug: false # Visual Studio Installer - vsInstallerUri: $(VsInstallerUri) vsComponents: '' installVsComponents: false @@ -52,7 +51,6 @@ steps: targetType: filePath filePath: $(Build.SourcesDirectory)/vnext/Scripts/Tfs/Install-VsFeatures.ps1 arguments: - -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} -Collect:$${{ parameters.debug }} -Cleanup:$true diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index 5cd427c9903..364d35ac186 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -7,7 +7,6 @@ parameters: experimentalNugetDependency: false vsComponents: '' installVsComponents: false - vsInstallerUri: $(VsInstallerUri) steps: - checkout: self # self represents the repo where the initial Pipelines YAML file was found @@ -103,7 +102,6 @@ steps: targetType: filePath filePath: $(Build.SourcesDirectory)/vnext/Scripts/Tfs/Install-VsFeatures.ps1 arguments: - -InstallerUri ${{ parameters.vsInstallerUri }} -Components ${{ parameters.vsComponents }} -Cleanup:$true condition: and(succeeded(), ${{ parameters.installVsComponents }}) diff --git a/.ado/variables/msbuild.yml b/.ado/variables/msbuild.yml index e3294856312..ff72852ca88 100644 --- a/.ado/variables/msbuild.yml +++ b/.ado/variables/msbuild.yml @@ -3,5 +3,4 @@ variables: MSBuildPreferredToolArchitecture: x64 MSBuildPlatformToolset: v142 TargetPlatformVersion: 10.0.18362.0 - Win10Version: 18362 - VsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe' \ No newline at end of file + Win10Version: 18362 \ No newline at end of file diff --git a/.ado/variables/vs2019.yml b/.ado/variables/vs2019.yml index 858fdcf0204..af3363aa032 100644 --- a/.ado/variables/vs2019.yml +++ b/.ado/variables/vs2019.yml @@ -1,6 +1,7 @@ variables: VmImage: windows-2019 VsComponents: 'Microsoft.Component.MSBuild,Microsoft.VisualStudio.ComponentGroup.UWP.VC,Microsoft.VisualStudio.Component.VC.Tools.x86.x64,Microsoft.VisualStudio.Component.VC.Tools.ARM,Microsoft.VisualStudio.Component.VC.Tools.ARM64' + VsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe' MSBuildVersion: 16.0 GoogleTestAdapterPath: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\ked32bft.vu0' BaseIntDir: $(Agent.HomeDirectory)\BaseIntDir # redirect to C: diff --git a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 index fc79f7f0349..6a836bc1cc5 100644 --- a/vnext/Scripts/Tfs/Install-VSFeatures.ps1 +++ b/vnext/Scripts/Tfs/Install-VSFeatures.ps1 @@ -2,8 +2,7 @@ param ( [Parameter(Mandatory=$true)] [string[]] $Components, - [Parameter(Mandatory=$true)] - [uri] $InstallerUri, + [uri] $InstallerUri = "https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe", [string] $VsInstaller = "${env:System_DefaultWorkingDirectory}\vs_Enterprise.exe", @@ -51,7 +50,7 @@ if ($UseWebInstaller) { -Wait ` -PassThru - Write-Host "Running VS installer to add requested components..." + Write-Host "Running downloaded VS installer to add requested components..." Start-Process ` -FilePath "$VsInstallOutputDir\vs_Enterprise.exe" ` @@ -75,7 +74,7 @@ if ($UseWebInstaller) { } } else { - Write-Host "Using local installer..." + Write-Host "Running local installer to add requested components..." Start-Process ` -FilePath "$LocalVsInstaller" ` From 8da43c462b36cdcf72292b73193a1fb5d9f35da5 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 12:48:29 -0700 Subject: [PATCH 13/20] Pipe through to build-rnw --- .ado/templates/build-rnw.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.ado/templates/build-rnw.yml b/.ado/templates/build-rnw.yml index 2a0260822fd..9132017549d 100644 --- a/.ado/templates/build-rnw.yml +++ b/.ado/templates/build-rnw.yml @@ -13,14 +13,14 @@ parameters: yarnBuildCmd: build # Visual Studio Installer - vsInstallerUri: $(VsInstallerUri) vsComponents: '' + installVsComponents: false steps: - template: prepare-env.yml parameters: - vsInstallerUri: ${{ parameters.vsInstallerUri }} vsComponents: ${{ parameters.vsComponents }} + installVsComponents: ${{ parameters.installVsComponents }} yarnBuildCmd: ${{ parameters.yarnBuildCmd }} debug: ${{ parameters.debug }} From 4ac5007cc415ca686f19a0a9ca204abe57df8dcd Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 12:51:23 -0700 Subject: [PATCH 14/20] Don't run install vs components for any job --- .ado/variables/vs2019.yml | 2 +- .ado/windows-vs-pr.yml | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.ado/variables/vs2019.yml b/.ado/variables/vs2019.yml index af3363aa032..32869b42f30 100644 --- a/.ado/variables/vs2019.yml +++ b/.ado/variables/vs2019.yml @@ -1,6 +1,6 @@ variables: VmImage: windows-2019 - VsComponents: 'Microsoft.Component.MSBuild,Microsoft.VisualStudio.ComponentGroup.UWP.VC,Microsoft.VisualStudio.Component.VC.Tools.x86.x64,Microsoft.VisualStudio.Component.VC.Tools.ARM,Microsoft.VisualStudio.Component.VC.Tools.ARM64' + # VsComponents: 'Microsoft.Component.MSBuild,Microsoft.VisualStudio.ComponentGroup.UWP.VC,Microsoft.VisualStudio.Component.VC.Tools.x86.x64,Microsoft.VisualStudio.Component.VC.Tools.ARM,Microsoft.VisualStudio.Component.VC.Tools.ARM64' VsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe' MSBuildVersion: 16.0 GoogleTestAdapterPath: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\ked32bft.vu0' diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index f660bd2faaf..f82910a9527 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -73,8 +73,8 @@ jobs: parameters: yarnBuildCmd: build project: vnext/ReactWindows-Universal.sln - vsComponents: $(VsComponents) - installVsComponents: true + # vsComponents: $(VsComponents) + # installVsComponents: true - task: VSTest@2 displayName: Run Universal Unit Tests @@ -152,8 +152,8 @@ jobs: - template: templates/prepare-env.yml parameters: vsComponents: $(VsComponents) - installVsComponents: true - yarnBuildCmd: build + # installVsComponents: true + # yarnBuildCmd: build - task: NuGetCommand@2 displayName: NuGet restore - Playground @@ -256,8 +256,8 @@ jobs: - template: templates/prepare-env.yml parameters: vsComponents: $(VsComponents) - installVsComponents: true - yarnBuildCmd: build + # installVsComponents: true + # yarnBuildCmd: build - task: NuGetCommand@2 displayName: NuGet restore - SampleApps @@ -511,8 +511,8 @@ jobs: configuration: $(configuration) platform: $(platform) version: $(reactNativeVersion) - vsComponents: $(VsComponents) - installVsComponents: true + # vsComponents: $(VsComponents) + # installVsComponents: true - job: CliInitExperimental displayName: Verify react-native init experimental @@ -531,8 +531,8 @@ jobs: configuration: Release platform: x64 version: $(reactNativeVersion) - vsComponents: $(VsComponents) - installVsComponents: true + # vsComponents: $(VsComponents) + # installVsComponents: true experimentalNugetDependency: true - job: RNWExtraChecks From f7a9460f5645bfafe4165a3ffc4d1047871d0654 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 14:27:58 -0700 Subject: [PATCH 15/20] Added logging to msbuildtools.js --- vnext/local-cli/runWindows/utils/msbuildtools.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/vnext/local-cli/runWindows/utils/msbuildtools.js b/vnext/local-cli/runWindows/utils/msbuildtools.js index b4db1c6f1ef..309e6655b2e 100644 --- a/vnext/local-cli/runWindows/utils/msbuildtools.js +++ b/vnext/local-cli/runWindows/utils/msbuildtools.js @@ -155,11 +155,21 @@ function checkMSBuildVersion(version, buildArch, verbose) { ]; const vsPath = VSWhere(requires.join(' '), version, 'installationPath'); + + if (verbose) { + console.log('VS path: ' + vsPath); + } + const installationVersion = VSWhere( requires.join(' '), version, 'installationVersion', ); + + if (verbose) { + console.log('VS version: ' + installationVersion); + } + // VS 2019 changed path naming convention const vsVersion = version === '16.0' ? 'Current' : version; @@ -171,6 +181,10 @@ function checkMSBuildVersion(version, buildArch, verbose) { 'Bin/MSBuild.exe', ); + if (verbose) { + console.log('Looking for MSBuilt at: ' + msBuildPath); + } + toolsPath = fs.existsSync(msBuildPath) ? path.dirname(msBuildPath) : null; // We found something so return MSBuild Tools. From 3f311e426ebe94a91e0d90e3904302d790c24103 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 14:45:27 -0700 Subject: [PATCH 16/20] More msbuild logging --- .../runWindows/utils/msbuildtools.js | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/vnext/local-cli/runWindows/utils/msbuildtools.js b/vnext/local-cli/runWindows/utils/msbuildtools.js index 309e6655b2e..2a20ee878c4 100644 --- a/vnext/local-cli/runWindows/utils/msbuildtools.js +++ b/vnext/local-cli/runWindows/utils/msbuildtools.js @@ -90,15 +90,22 @@ class MSBuildTools { } } -function VSWhere(requires, version, property) { +function VSWhere(requires, version, property, verbose) { // This path is maintained and VS has promised to keep it valid. const vsWherePath = path.join( process.env['ProgramFiles(x86)'] || process.env.ProgramFiles, '/Microsoft Visual Studio/Installer/vswhere.exe', ); + if (verbose) { + console.log('Looking for vswhere at: ' + vsWherePath); + } + // Check if vswhere is present and try to find MSBuild. if (fs.existsSync(vsWherePath)) { + if (verbose) { + console.log('Found vswhere.'); + } const vsPath = child_process .execSync( `"${vsWherePath}" -version [${version},${Number(version) + @@ -108,6 +115,9 @@ function VSWhere(requires, version, property) { .split(EOL)[0]; return vsPath; } else { + if (verbose) { + console.log("Couldn't find vswhere, querying registry."); + } const query = `reg query HKLM\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\${version} /s /v MSBuildToolsPath`; let toolsPath = null; // Try to get the MSBuild path using registry @@ -116,6 +126,9 @@ function VSWhere(requires, version, property) { let toolsPathOutput = /MSBuildToolsPath\s+REG_SZ\s+(.*)/i.exec(output); if (toolsPathOutput) { let toolsPathOutputStr = toolsPathOutput[1]; + if (verbose) { + console.log('Query found: ' + toolsPathOutputStr); + } // Win10 on .NET Native uses x86 arch compiler, if using x64 Node, use x86 tools if (version === '16.0') { toolsPathOutputStr = path.resolve(toolsPathOutputStr, '..'); @@ -154,7 +167,12 @@ function checkMSBuildVersion(version, buildArch, verbose) { 'Microsoft.VisualStudio.ComponentGroup.UWP.VC', ]; - const vsPath = VSWhere(requires.join(' '), version, 'installationPath'); + const vsPath = VSWhere( + requires.join(' '), + version, + 'installationPath', + verbose, + ); if (verbose) { console.log('VS path: ' + vsPath); @@ -164,6 +182,7 @@ function checkMSBuildVersion(version, buildArch, verbose) { requires.join(' '), version, 'installationVersion', + verbose, ); if (verbose) { From 1c10341a8aa1f7bb0cb62d1812e0a73ecc912bb8 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 15:24:55 -0700 Subject: [PATCH 17/20] Added output of vs component list so we know what is already on the vm --- .ado/templates/prepare-env.yml | 6 ++++++ .ado/templates/react-native-init.yml | 6 ++++++ vnext/local-cli/runWindows/utils/msbuildtools.js | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index 28175fee6b3..89fc11a39a3 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -45,6 +45,12 @@ steps: parameters: sdkVersion: $(Win10Version) + - task: PowerShell@2 + displayName: List Visual Studio Components + inputs: + targetType: filePath + filePath: $(Build.SourcesDirectory)/.ado/VSComponentList.ps1 + - task: PowerShell@2 displayName: Install Visual Studio dependencies inputs: diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index 364d35ac186..9702698b381 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -96,6 +96,12 @@ steps: parameters: sdkVersion: $(Win10Version) + - task: PowerShell@2 + displayName: List Visual Studio Components + inputs: + targetType: filePath + filePath: $(Build.SourcesDirectory)/.ado/VSComponentList.ps1 + - task: PowerShell@2 displayName: Install Visual Studio dependencies inputs: diff --git a/vnext/local-cli/runWindows/utils/msbuildtools.js b/vnext/local-cli/runWindows/utils/msbuildtools.js index 2a20ee878c4..496f9f3eb0a 100644 --- a/vnext/local-cli/runWindows/utils/msbuildtools.js +++ b/vnext/local-cli/runWindows/utils/msbuildtools.js @@ -106,14 +106,14 @@ function VSWhere(requires, version, property, verbose) { if (verbose) { console.log('Found vswhere.'); } - const vsPath = child_process + const propertyValue = child_process .execSync( `"${vsWherePath}" -version [${version},${Number(version) + 1}) -products * -requires ${requires} -property ${property}`, ) .toString() .split(EOL)[0]; - return vsPath; + return propertyValue; } else { if (verbose) { console.log("Couldn't find vswhere, querying registry."); From a8aa0debd51a6d917d9daad6ac15f3931d618823 Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 15:49:50 -0700 Subject: [PATCH 18/20] Remove unnecessary version check --- .ado/variables/vs2019.yml | 2 +- vnext/local-cli/runWindows/utils/msbuildtools.js | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.ado/variables/vs2019.yml b/.ado/variables/vs2019.yml index 32869b42f30..33d363f6e36 100644 --- a/.ado/variables/vs2019.yml +++ b/.ado/variables/vs2019.yml @@ -1,6 +1,6 @@ variables: VmImage: windows-2019 - # VsComponents: 'Microsoft.Component.MSBuild,Microsoft.VisualStudio.ComponentGroup.UWP.VC,Microsoft.VisualStudio.Component.VC.Tools.x86.x64,Microsoft.VisualStudio.Component.VC.Tools.ARM,Microsoft.VisualStudio.Component.VC.Tools.ARM64' + # VsComponents: 'Microsoft.Component.MSBuild,Microsoft.VisualStudio.Component.VC.Tools.x86.x64,Microsoft.VisualStudio.Component.VC.Tools.ARM,Microsoft.VisualStudio.Component.VC.Tools.ARM64' VsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe' MSBuildVersion: 16.0 GoogleTestAdapterPath: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\ked32bft.vu0' diff --git a/vnext/local-cli/runWindows/utils/msbuildtools.js b/vnext/local-cli/runWindows/utils/msbuildtools.js index 496f9f3eb0a..00e8d616b5e 100644 --- a/vnext/local-cli/runWindows/utils/msbuildtools.js +++ b/vnext/local-cli/runWindows/utils/msbuildtools.js @@ -161,11 +161,7 @@ function checkMSBuildVersion(version, buildArch, verbose) { } // https://aka.ms/vs/workloads - const requires = [ - 'Microsoft.Component.MSBuild', - getVCToolsByArch(buildArch), - 'Microsoft.VisualStudio.ComponentGroup.UWP.VC', - ]; + const requires = ['Microsoft.Component.MSBuild', getVCToolsByArch(buildArch)]; const vsPath = VSWhere( requires.join(' '), From 8f9c1d9e0c611bf94caafa58ae7e77036e02ab5d Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 16:14:44 -0700 Subject: [PATCH 19/20] Disabled listing/installing vs components by default --- .ado/VSComponentList.ps1 | 7 ++++--- .ado/publish.yml | 1 - .ado/templates/build-rnw.yml | 2 ++ .ado/templates/prepare-env.yml | 2 ++ .ado/templates/react-native-init.yml | 2 ++ .ado/variables/vs2019.yml | 2 -- .ado/windows-vs-pr.yml | 14 -------------- 7 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.ado/VSComponentList.ps1 b/.ado/VSComponentList.ps1 index bd27aca3c19..842aae5825d 100644 --- a/.ado/VSComponentList.ps1 +++ b/.ado/VSComponentList.ps1 @@ -13,11 +13,12 @@ Invoke-WebRequest -Uri 'https://download.visualstudio.microsoft.com/download/pr/ $p = Start-Process -PassThru $dir\vs_enterprise.exe -RedirectStandardError $dir\err -RedirectStandardOutput $dir\out -ArgumentList "export --installpath `"$installationPath`" --quiet --config $vsconfig" $p.WaitForExit() $x = [Datetime]::Now.AddSeconds(60) -while (!(Test-Path $vsconfig) -and ([datetime]::Now -lt $x)) + +do { - Sleep 5 Write-Host "Waiting for vsconfig file..." -} + Sleep 5 +} while (!(Test-Path $vsconfig) -and ([datetime]::Now -lt $x)) Get-Content $dir\err Get-Content $dir\out diff --git a/.ado/publish.yml b/.ado/publish.yml index 7647c4281f6..10bb4aaf930 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -149,7 +149,6 @@ jobs: - template: templates/build-rnw.yml parameters: project: vnext/ReactWindows-Universal.sln - vsComponents: $(VsComponents) - template: templates/publish-build-artifacts-for-nuget.yml parameters: diff --git a/.ado/templates/build-rnw.yml b/.ado/templates/build-rnw.yml index 9132017549d..52e468f533a 100644 --- a/.ado/templates/build-rnw.yml +++ b/.ado/templates/build-rnw.yml @@ -14,12 +14,14 @@ parameters: # Visual Studio Installer vsComponents: '' + listVsComponents: false installVsComponents: false steps: - template: prepare-env.yml parameters: vsComponents: ${{ parameters.vsComponents }} + listVsComponents: ${{ parameters.listVsComponents }} installVsComponents: ${{ parameters.installVsComponents }} yarnBuildCmd: ${{ parameters.yarnBuildCmd }} debug: ${{ parameters.debug }} diff --git a/.ado/templates/prepare-env.yml b/.ado/templates/prepare-env.yml index 89fc11a39a3..fcc37dac7a7 100644 --- a/.ado/templates/prepare-env.yml +++ b/.ado/templates/prepare-env.yml @@ -6,6 +6,7 @@ parameters: # Visual Studio Installer vsComponents: '' + listVsComponents: false installVsComponents: false steps: @@ -50,6 +51,7 @@ steps: inputs: targetType: filePath filePath: $(Build.SourcesDirectory)/.ado/VSComponentList.ps1 + condition: and(succeeded(), ${{ parameters.listVsComponents }}) - task: PowerShell@2 displayName: Install Visual Studio dependencies diff --git a/.ado/templates/react-native-init.yml b/.ado/templates/react-native-init.yml index 9702698b381..2687f1a0d6d 100644 --- a/.ado/templates/react-native-init.yml +++ b/.ado/templates/react-native-init.yml @@ -6,6 +6,7 @@ parameters: configuration: experimentalNugetDependency: false vsComponents: '' + listVsComponents: false installVsComponents: false steps: @@ -101,6 +102,7 @@ steps: inputs: targetType: filePath filePath: $(Build.SourcesDirectory)/.ado/VSComponentList.ps1 + condition: and(succeeded(), ${{ parameters.listVsComponents }}) - task: PowerShell@2 displayName: Install Visual Studio dependencies diff --git a/.ado/variables/vs2019.yml b/.ado/variables/vs2019.yml index 33d363f6e36..242f8ec272d 100644 --- a/.ado/variables/vs2019.yml +++ b/.ado/variables/vs2019.yml @@ -1,7 +1,5 @@ variables: VmImage: windows-2019 - # VsComponents: 'Microsoft.Component.MSBuild,Microsoft.VisualStudio.Component.VC.Tools.x86.x64,Microsoft.VisualStudio.Component.VC.Tools.ARM,Microsoft.VisualStudio.Component.VC.Tools.ARM64' - VsInstallerUri: 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe' MSBuildVersion: 16.0 GoogleTestAdapterPath: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\ked32bft.vu0' BaseIntDir: $(Agent.HomeDirectory)\BaseIntDir # redirect to C: diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index f82910a9527..5c73df39094 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -73,8 +73,6 @@ jobs: parameters: yarnBuildCmd: build project: vnext/ReactWindows-Universal.sln - # vsComponents: $(VsComponents) - # installVsComponents: true - task: VSTest@2 displayName: Run Universal Unit Tests @@ -150,10 +148,6 @@ jobs: submodules: false - template: templates/prepare-env.yml - parameters: - vsComponents: $(VsComponents) - # installVsComponents: true - # yarnBuildCmd: build - task: NuGetCommand@2 displayName: NuGet restore - Playground @@ -254,10 +248,6 @@ jobs: submodules: false - template: templates/prepare-env.yml - parameters: - vsComponents: $(VsComponents) - # installVsComponents: true - # yarnBuildCmd: build - task: NuGetCommand@2 displayName: NuGet restore - SampleApps @@ -511,8 +501,6 @@ jobs: configuration: $(configuration) platform: $(platform) version: $(reactNativeVersion) - # vsComponents: $(VsComponents) - # installVsComponents: true - job: CliInitExperimental displayName: Verify react-native init experimental @@ -531,8 +519,6 @@ jobs: configuration: Release platform: x64 version: $(reactNativeVersion) - # vsComponents: $(VsComponents) - # installVsComponents: true experimentalNugetDependency: true - job: RNWExtraChecks From 3ca3030e2d2fea761238173f5c08898e3ec7e3de Mon Sep 17 00:00:00 2001 From: "Jon Thysell (JAUNTY)" Date: Tue, 7 Apr 2020 16:31:54 -0700 Subject: [PATCH 20/20] remove e2etest vs components --- .ado/templates/e2e-test-job.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.ado/templates/e2e-test-job.yml b/.ado/templates/e2e-test-job.yml index 4b0965a9821..3f12627159d 100644 --- a/.ado/templates/e2e-test-job.yml +++ b/.ado/templates/e2e-test-job.yml @@ -43,10 +43,6 @@ jobs: Get-WmiObject Win32_LogicalDisk - template: prepare-env.yml - parameters: - vsComponents: $(VsComponents) - installVsComponents: true - yarnBuildCmd: build - task: NuGetCommand@2 displayName: NuGet restore - ReactUWPTestApp