Skip to main content
Visitor II
March 20, 2023
Question

vcpkg configuration

  • March 20, 2023
  • 5 replies
  • 9569 views

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

    This topic has been closed for replies.

    5 replies

    Visitor II
    March 20, 2023

    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.

    Visitor II
    March 22, 2023

    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.1Author
    Visitor II
    March 22, 2023

    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.

    Explorer
    March 23, 2023

    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.

    Visitor II
    March 23, 2023

    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

    Explorer
    March 29, 2023

    Thank you.

    Explorer II
    August 1, 2023

    I also got this error and solved it as fololows:

    In case of error `vcpkgTools.xml"): no such file or directory` :
    * go to the indicated path (in my case `C:\Users\<user>\AppData\Roaming\Code\User\globalStorage\ms-vscode.vscode-embedded-tools\vcpkg\root`).
    * If you see only `vcpkg-standalone-bundle.tar.gz` file, unpack this file to the folder so requested path exists. (`.\vcpkg\root\scripts\vcpkgTools.xml`).