Skip to content

Commit

Permalink
Stop the build from trying to import vcpkg during nuget restore
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett committed Jul 20, 2024
1 parent 3c5800f commit 6455565
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/common.build.post.props
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,6 @@
</ItemDefinitionGroup>

<!-- For C++ projects, bring in the vcpkg targets at the end -->
<Import Project="$(VcpkgRoot)/scripts/buildsystems/msbuild/vcpkg.targets" Condition="'$(MSBuildProjectExtension)'=='.vcxproj'" />
<!-- We check NuGetRestoreTargets to determine if we are in a NuGet restore step; if we are, skip vcpkg -->
<Import Project="$(VcpkgRoot)/scripts/buildsystems/msbuild/vcpkg.targets" Condition="'$(MSBuildProjectExtension)'=='.vcxproj' and '$(NuGetRestoreTargets)'==''" />
</Project>
3 changes: 2 additions & 1 deletion src/common.build.pre.props
Original file line number Diff line number Diff line change
Expand Up @@ -283,5 +283,6 @@
<VCPkgLocalAppDataDisabled>true</VCPkgLocalAppDataDisabled>
</PropertyGroup>

<Import Project="$(VcpkgRoot)/scripts/buildsystems/msbuild/vcpkg.props" Condition="'$(MSBuildProjectExtension)'=='.vcxproj'" />
<!-- We check NuGetRestoreTargets to determine if we are in a NuGet restore step; if we are, skip vcpkg -->
<Import Project="$(VcpkgRoot)/scripts/buildsystems/msbuild/vcpkg.props" Condition="'$(MSBuildProjectExtension)'=='.vcxproj' and '$(NuGetRestoreTargets)'==''" />
</Project>

0 comments on commit 6455565

Please sign in to comment.