找不到V143的构建工具 - 已安装构建工具&使用正确的VS版本

发布于 2025-02-06 18:58:50 字数 600 浏览 4 评论 0原文

这类似于无法找到MS构建工具的其他问题,但是在我的情况下,我已经安装了构建工具,并且我正在使用Windows 10上指定的工具(VS2022)的正确版本

VS。无法找到V143的构建工具。“当我尝试在最初使用VS2010开发的VS2022中构建C ++项目时,就会发生,但已升级以使用V143构建工具。

我安装了以下内容:

“

“

任何人都可以解释为什么会发生这种情况并提供解决方案?

This is similar to other questions where MS build tools could not be found but in my case I have already installed the build tools and I am using the correct version of VS for the specified tools (VS2022) on Windows 10.

The error message "The build tools for v143 cannot be found" is occurring when I try to build a C++ project in VS2022 that was originally developed using VS2010 but was upgraded to use the v143 build tools.

I have the following installed:

VS Installer - Components (Compilers, Build Tools And Runtimes)

VS Installer - Components (Development Activities)

Can anyone explain why this is happening and provide a solution?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

你好,陌生人 2025-02-13 18:58:50

我建议您参考此问题

我建议您安装VS2022以使用V143构建工具。或者您可以
右键单击您的项目>属性>一般>平台工具集
并为您的VS。

选择相应的版本

同样,此反馈也具有参考值。

I suggest you refer to this issue:

I suggest you install VS2022 to use v143 build tools. Or you can
right-click on your project > Properties > General > Platform Toolset
and select the corresponding version for your VS.

Similarly, this FeedBack also has reference value.

四叶草在未来唯美盛开 2025-02-13 18:58:50

也许您正在VS 2019中开放该项目,这发生在我身上。

maybe you are opening the project in VS 2019, it happens to me.

放肆 2025-02-13 18:58:50

我面临类似的问题。我在环境变量中设置了vCtargetSpath。在删除此变量时,项目构建成功

I faced similar issue. I had VCTargetsPath set in my environment Variable. On deleting this variable, project build successfully

情释 2025-02-13 18:58:50

在VS2022中,您必须将平台工具集设置为
Visual Studio 2022(V143)

  1. Open Property Manager 用于项目
  2. 导航到Eg 版本配置
  3. 打开 property Pages (alt f7)
  4. 共同属性 - > 一般 - > 平台工具集
  5. 选择 Visual Studio 2022(v143) value
  6. wall ok ok
  7. 重建版本项目的配置现在应该

调试配置做同样的工作。

In VS2022 you have to set the Platform Toolset property to the value of
Visual Studio 2022 (v143)

  1. open Property Manager for the project
  2. navigate to e.g. Release configuration
  3. open Property Pages on it (ALT F7)
  4. Common Properties -> General -> Platform Toolset
  5. select the Visual Studio 2022 (v143) value
  6. press OK
  7. Rebuild the Release configuration of the project and it should work now

Do the same for the Debug configuration.

乖乖哒 2025-02-13 18:58:50

在Windows上构建CPYTHON时,我也有类似的错误。

相关错误消息在下面。

Project "D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" on node 1 (default targets).
Project "D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" (1) is building "D:\code\python\windows-python-installe
r\cpython\PCbuild\pyshellext.vcxproj" (2) on node 1 (Build target(s)).
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools f 
or v143 (Platform Toolset = 'v143') cannot be found. To build using the v143 build tools, please install v143 build tools.  Alternatively, you may up 
grade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:\code\ 
python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj]
Done Building Project "D:\code\python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj" (Build target(s)) -- FAILED.

Done Building Project "D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" (default targets) -- FAILED.


Build FAILED.

"D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" (default target) (1) ->
"D:\code\python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj" (Build target) (2) ->
(PrepareForBuild target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools 
 for v143 (Platform Toolset = 'v143') cannot be found. To build using the v143 build tools, please install v143 build tools.  Alternatively, you may  
upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:\cod 
e\python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj]

    0 Warning(s)
    1 Error(s)

我通过安装C ++(V143)通用Windows平台...修复了此问题。

I have the similar error when build cpython on windows.

The related error messages are below.

Project "D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" on node 1 (default targets).
Project "D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" (1) is building "D:\code\python\windows-python-installe
r\cpython\PCbuild\pyshellext.vcxproj" (2) on node 1 (Build target(s)).
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools f 
or v143 (Platform Toolset = 'v143') cannot be found. To build using the v143 build tools, please install v143 build tools.  Alternatively, you may up 
grade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:\code\ 
python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj]
Done Building Project "D:\code\python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj" (Build target(s)) -- FAILED.

Done Building Project "D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" (default targets) -- FAILED.


Build FAILED.

"D:\code\python\windows-python-installer\cpython\Tools\msi\launcher\launcher.wixproj" (default target) (1) ->
"D:\code\python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj" (Build target) (2) ->
(PrepareForBuild target) ->
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(456,5): error MSB8020: The build tools 
 for v143 (Platform Toolset = 'v143') cannot be found. To build using the v143 build tools, please install v143 build tools.  Alternatively, you may  
upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [D:\cod 
e\python\windows-python-installer\cpython\PCbuild\pyshellext.vcxproj]

    0 Warning(s)
    1 Error(s)

And I fixed this via install C++(v143) Universal windows Platform ....

enter image description here

稚气少女 2025-02-13 18:58:50

确保VCTARGETSPATH指向:

c:\ program Files(x86)\ Microsoft Visual Studio \ 2022 \ buildTools \ MSBUILD \ MICHOSOFT \ MICROSOFT \ VC \ VC \ VC \ V170 \

Make sure that VCTargetsPath points to:

C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\

執念 2025-02-13 18:58:50

尽管我在许多项目中都使用v143在一个特定的项目中可以对我来说。

事实证明,在我的vcxproj文件中,我不小心删除了参考:

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

一旦我将其添加到所有内容中,就可以了。

This can up for me in a specific project, even though, I was using v143 in many projects.

It turns out in my vcxproj file, I accidently removed the reference:

<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

Once I added it back in everything compiled fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文