cancel
Showing results for 
Search instead for 
Did you mean: 

vcpkg configuration

CRebe.1
Associate II

Hello,

Every time I try to import a project to VSCode I get the following vcpkg configuration error:

read_contents("C:\Users\<username>\AppData\Roaming\Code\User\globalStorage\ms-vscode.vscode-embedded-tools\vcpkg\root\scripts\vcpkgTools.xml"): no such file or directory

Do you know where I'm supposed to get vcpkgTools.xml from ? Is that a file that should get installed through the extension?

Thanks

11 REPLIES 11
Jais
Associate II

I don't know anything about vcpkg, but my vcpkg problems went away after running the command described here.

If that doesn't help, try reporting the problem in the Embedded Tools repository.

Inviman
Associate

I manually opened C:\Users\<username>\AppData\Roaming\Code\User\globalStorage\ms-vscode.vscode-embedded-tools\vcpkg\root and found a .tar.gz file. I just extracted it (twice) with 7z and it worked

CRebe.1
Associate II

I figured it out, thanks to @Jais​ and @Inviman​  for the pointers to the steps to follow.

I eventually figured out that for some reason vcpkg was not installed correctly on the machine. But running the following command (taken from Jais' answer)

iex (iwr -useb https://aka.ms/vcpkg-init.ps1)

Didn't complete. Turns out the Powershell version isntalled on the system was outdated.

Upgrading Powershell resolved that issue.

That didn't quite fix everything as, just as in Invman's situation, my vcpkg files were still a compressed tarball. Extracting them resolved the issue.

Ahmet Yasin CİVAN
Associate III

I am trying to install vcpkg on my machine to C:\Users\<username>/.vcpkg directory, but I am getting the following error:

Installing vcpkg to C:\Users\<username>/.vcpkg
Downloading 'https://github.com/microsoft/vcpkg-tool/releases/download/2023-03-14/vcpkg.exe' -> 'C:\Users\<username>\.vcpkg\vcpkg.exe'
bootstrap-vcpkg : Bootstrap failed.
At line:76 char:10
+ if(-Not (bootstrap-vcpkg)) {
+          ~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,bootstrap-vcpkg

I have tried to resolve this issue, but I haven't found a solution yet. Can anyone help me with this? How can I fix this error and successfully install vcpkg?

Thank you in advance for your help.

There is a copy of vcpkg bundled with the Embedded Tools extension the STM32 extension depends on, so you should not need to install it separately. That said this would be a good place to report this error.

https://github.com/microsoft/vcpkg/issues

run it as administrator and that error should go away

I tried this but the problem is not solved.

Thank you.

What version of powershell is executing the script? If not on a recent version try upgrading.