[vcpkg] Fix nuget package import failed. (#11093)

* fix bug that caused exported nuget package import failure.

* Give priority to nuget package to set $(VcpkgRoot).

* [vcpkg] Remove trailing whitespace

* fix nuget package import failed

Co-authored-by: 施浩男 <shihaonan@zhongli360.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
shihaonan369 2020-05-14 14:37:15 +08:00 committed by GitHub
parent 430a10ff35
commit 4727bc86a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@ namespace vcpkg::Export
return Strings::format(R"###( return Strings::format(R"###(
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<VcpkgRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), .vcpkg-root))\installed\$(VcpkgTriplet)\</VcpkgRoot> <VcpkgRoot></VcpkgRoot>
</PropertyGroup> </PropertyGroup>
<Import Condition="Exists('%s')" Project="%s" /> <Import Condition="Exists('%s')" Project="%s" />
</Project> </Project>