vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

After installing vcpkg into Visual Studio, linker gives error "'pwsh.exe' is not recognized..."

Open OpenShooter opened this issue 1 year ago • 1 comments

Windows 11 Pro, Visual Studio 2022 17.6.5 After every native C++ build, I get a message from the linker 'pwsh.exe' is not recognized as an internal or external command, operable program or batch file.

This behavior began after I installed vcpkg and used it to get the cURL package. I am not using the cURL libraries for this project, however.

If it matters, I can access Visual Studio 2022 Developer PowerShell v17.6.5 from the VS menu Tools / Command Line / Developer Power Shell.

Here is how I installed vcpkg: I used VS Git / clone to obtain the vcpkg files from github. Then


** Visual Studio 2022 Developer Command Prompt v17.6.5 ** Copyright (c) 2022 Microsoft Corporation


C:\Miscellaneous_Libraries\vcpkg>bootstrap-vcpkg.bat Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2024-02-07/vcpkg.exe -> C:\Miscellaneous_Libraries\vcpkg\vcpkg.exe... done. Validating signature... done.

vcpkg package management program version 2024-02-07-8a83681f921b10d86ae626fd833c253f4f8c355b

C:\Miscellaneous_Libraries\vcpkg>vcpkg integrate install Applied user-wide integration for this vcpkg root. CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/Miscellaneous_Libraries/vcpkg/scripts/buildsystems/vcpkg.cmake"

All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.

This is how I used vcpkg to get the cURL files: C:\Miscellaneous_Libraries\vcpkg>vcpkg install curl[tool]

OpenShooter avatar Feb 13 '24 19:02 OpenShooter

I had a similar issue using VS2022. I had to download and install PowerShell-7 from https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/PowerShell-7.4.1-win-x64.msi

elcombs avatar Feb 14 '24 02:02 elcombs

You may need to download and install pwsh manually.

JackBoosY avatar Feb 20 '24 08:02 JackBoosY

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.

github-actions[bot] avatar Mar 20 '24 01:03 github-actions[bot]

We hope your question was answered to your satisfaction; if it wasn't, you can reopen with more info.

MonicaLiu0311 avatar Mar 20 '24 02:03 MonicaLiu0311