Skip to content

Commit cbc8eed

Browse files
authored
build: bootstrap vcpkg before nuget restore (#17592)
`nuget restore` actually runs through MSBuild! However, #15855 added a dependency from our project on a system-installed _or locally detected_ `vcpkg.targets` (or `.props`). Our build runs `nuget restore` before finding or installing vcpkg, so the rules in our project file would try to import vcpkg before it had been found (or installed). On build agents with vcpkg installed via the VS workload, this was fine: we would import the one that came with VS and go on our merry way. On build agents where it needs to be installed locally, it could not be imported. The fix in this PR is to install/bootstrap vcpkg before running nuget. I tried to isolate the vcpkg rules to only run _in the absence of nuget_, but that didn't work.
1 parent d74440f commit cbc8eed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/pipelines/templates-v2/job-build-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ jobs:
159159
.\build\scripts\Generate-ThirdPartyNotices.ps1 -MarkdownNoticePath .\NOTICE.md -OutputPath .\src\cascadia\CascadiaPackage\NOTICE.html
160160
displayName: Generate NOTICE.html from NOTICE.md
161161
162-
- template: .\steps-restore-nuget.yml
163-
164162
- template: .\steps-install-vcpkg.yml
165163

164+
- template: .\steps-restore-nuget.yml
165+
166166
- pwsh: |-
167167
.\build\scripts\Set-LatestVCToolsVersion.ps1
168168
displayName: Work around DD-1541167 (VCToolsVersion)

0 commit comments

Comments
 (0)