Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing two versions of Visual Studio at the same time will result in MSBuild.exe not being able to find the build to the tool #7996

Closed
vsfeedback opened this issue Sep 18, 2024 · 1 comment
Assignees

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice] [regression] [worked-in:17.9/16.*]
I have installed two versions of Visual Studio in my computer, VS2019 and VS2022, my 2019 version has C/C++ installed, but my 2022 version does not, when I use MSBuild to compile python3.11.10, the program keeps reporting errors, the error is as follows:
error MSB8020: Unable to find build tool for v142 (platform toolset="v142"). To build using the v142 build tool, install the v142 build tool. Alternatively, you can upgrade to the current Visual Studio tool by selecting the Project menu or by right-clicking the solution, and then selecting Retarget Solution.
Then, I checked the directory of MSBuild where the error was reported, which is the MSBuild in the VS2019 installation directory, and if I open and compile it with the graphical program of Visual Studio 2019, it will not report the error.
Finally, I installed C/C++ support for the 2022 version so that it could compile and run properly


Original Comments

Feedback Bot on 9/10/2024, 00:09 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

@StellaHuang95
Copy link
Contributor

Hi there, thanks for reaching out. Glad to hear that installing C/C++ support for VS2022 resolved the issue. It could be that the v142 platform toolset relies on specific components that may not be fully recognized or compatible when only partially installed in an older version like VS2019. With C/C++ support in VS2022, MSBuild now has the necessary dependencies to target v142, avoiding the errors you encountered. If you have other issues related to Python Tools in Visual Studio, feel free to reopen the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants