Package Manager Console
NuGet version: 4.1.0
VS version: MS VS Community 2017 15.1 (26403.7)
OS version: win10 v1607 (14393.1066)
Install-Package vcpkg.F.vcpkg -Source "F:/`vcpkg/scripts/buildsystems"
Install-Package : Unable to find package 'vcpkg.F.vcpkg' at source 'F:/cpkg/scripts/buildsystems'.
It appears that it merges ' with v to produce vertical tab which messes up the paths.
Pasting the error in Notepad++ results in:
F:/VTcpkg/scripts/buildsystems
From which I assumed it is converted to a verticle tab
Logs:
PM> Install-Package vcpkg.F.vcpkg -Source "F:/`vcpkg/scripts/buildsystems"
Install-Package : Unable to find package 'vcpkg.F.vcpkg' at source 'F:/cpkg/scripts/buildsystems'.
At line:1 char:1
+ Install-Package vcpkg.F.vcpkg -Source "F:/`vcpkg/scripts/buildsystems ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Time Elapsed: 00:00:00.0208434
PM>
The back tick is the escape character in powershell.
does it work if you use: Install-Package vcpkg.F.vcpkg -Source "F:/\`vcpkg/scripts/buildsystems" or escape it in some other way?
That is unfortunate.
Same result:
PM> Install-Package vcpkg.F.vcpkg -Source "F:/\`vcpkg/scripts/buildsystems"
Install-Package : Unable to find package 'vcpkg.F.vcpkg' at source 'F:/\cpkg/scripts/buildsystems'.
At line:1 char:1
+ Install-Package vcpkg.F.vcpkg -Source "F:/\`vcpkg/scripts/buildsystem ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
Time Elapsed: 00:00:00.0863047
PM>
I was off on the escaping, double back tick works.
PM> Write-Host "F:/\`vcpkg/scripts/buildsystems"
F:/\鈾俢pkg/scripts/buildsystems
PM> Write-Host "F:/``vcpkg/scripts/buildsystems"
F:/`vcpkg/scripts/buildsystems
Indeed. Thanks a lot for the help.
What do you think - should I file a bug in VCPKG bug-base about this. Since I just copied and pasted this from vcpkg output:
F:\`vcpkg\scripts\buildsystems>vcpkg.exe integrate project
Created nupkg: F:\`vcpkg\scripts\buildsystems\vcpkg.D.Development.VCPKG.vcpkg.1.0.0.nupkg
With a project open, go to Tools->NuGet Package Manager->Package Manager Console and paste:
Install-Package vcpkg.D.Development.VCPKG.vcpkg -Source "F:/`vcpkg/scripts/buildsystems"
@DVMirchev if that is what the instructions for VCPKG say, then yes it looks like an issue with the docs.
From what I can tell this looks like normal powershell behavior, NuGet isn't getting a chance to handle this.
This was a bug in vcpkg and should be fixed by Microsoft/vcpkg#964. Thanks!