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

Building 3.10 with VS2022 fails #94151

Closed
terryjreedy opened this issue Jun 23, 2022 · 3 comments
Closed

Building 3.10 with VS2022 fails #94151

terryjreedy opened this issue Jun 23, 2022 · 3 comments
Labels
3.10 only security fixes build The build process and cross-build OS-windows type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

terryjreedy commented Jun 23, 2022

I just installed VS2022 Community edition and updated my repository (the last commits were removing unused idlelib imports).
Main and 3.11 built with no errors. However, for 3.10...

f:\dev\310>"F:\VS2022\Community\MSBuild\Current\Bin\msbuild.exe" "f:\dev\310\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /clp:summary /p:Configuration=Debug /p:Platform=x64 /p:IncludeExternals=true /p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker= /p:GIT="C:\Users\Terry\AppData\Local\Programs\Git\cmd\git.exe"
  Killing any running python_d.exe instances...
  Generated sources are up to date
  Getting build info from C:\Users\Terry\AppData\Local\Programs\Git\cmd\git.exe
  Building heads/3.10:ee2ddc2d44 3.10
F:\VS2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(440,5)
: error MSB8020: The build tools for Visual Studio 2019 (Platform Toolset = 'v1
42') cannot be found. To build using the v142 build tools, please install Visua
l Studio 2019 build tools.  Alternatively, you may upgrade to the current Visua
l Studio tools by selecting the Project menu or right-click the solution, and t
hen selecting "Retarget solution". [f:\dev\310\PCbuild\pythoncore.vcxproj]

Build FAILED.

My guess is that some update for main and 3.11 needs to be backported to 3.10. (Right-clicking in Windows Explorer does not show a Retarget option, so I presume that suggestion only applies within VS, which I don't use.)

@zooba @zware

@terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error OS-windows build The build process and cross-build 3.10 only security fixes labels Jun 23, 2022
@kumaraditya303
Copy link
Contributor

You can use VS2022 by setting an env var until the config files are updated. If you use powershell then $env:PlatformToolset = "v143" or cmd.exe set PlatformToolset="v143" will fix it as a workaround.

@thatbirdguythatuknownot
Copy link
Contributor

thatbirdguythatuknownot commented Jun 23, 2022

You can use VS2022 by setting an env var until the config files are updated. If you use powershell then $env:PlatformToolset = "v143" or cmd.exe set PlatformToolset="v143" will fix it as a workaround.

Seems like #29577 needs a backport.

@terryjreedy
Copy link
Member Author

The backport worked for me. Thank you. this issue is essentially a followup to or duplicate of #89974.

@terryjreedy terryjreedy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes build The build process and cross-build OS-windows type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants