Skip to content

When building with VS2026 on Windows, use PlatformToolSet v145 by default #144679

Activity

  1. self-assigned this
    on Feb 10, 2026
  2. chris-eibl commented on Feb 10, 2026

    @chris-eibl
    MemberAuthor

    Using v145 also changes the appearance in the VS2026 solution explorer from

    Image

    to
    Image

  3. added a commit that references this issue on Feb 19, 2026
  4. added a commit that references this issue on Feb 19, 2026
  5. added a commit that references this issue on Feb 19, 2026
  6. DEVwXZ4Njdmo4hm commented on Feb 21, 2026

    @DEVwXZ4Njdmo4hm

    It can currently build without modifying any files, but packaging into an MSI bundle still fails. When running ./Tools/msi/buildrelease.bat, I always get:
    MSB8020: The build tools for v145 (Platform Toolset = 'v145') cannot be found.

    Detailed outputs:

    $ ./Tools/msi/buildrelease.bat -x64 --skip-nuget --skip-build
    Using py -3.14 (found 3.14 with py.exe)
    Fetching external libraries...
    Fetching external tools...
    binutils already exists, skipping.
    gpg already exists, skipping.
    htmlhelp already exists, skipping.
    nuget already exists, skipping.
    redist-1 already exists, skipping.
    wix-314 already exists, skipping.
    Finished.
    Using "C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\amd64\MSBuild.exe"  (found in the PATH)
    MSBuild version 18.3.0-release-26070-10+3972042b7 for .NET Framework
    Build started 2026/2/21 8:31:01.
    
    Project "E:\Sources\Python\Tools\msi\launcher\launcher.wixproj" on node 1 (default targets).
    Project "E:\Sources\Python\Tools\msi\launcher\launcher.wixproj" (1) is building "E:\Sources\Python\PCbuild\pyshellext.vcxproj" (2) on node 1 (Build target(s)).
    C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppBuild.targets(473,5): error MSB8020: The build tools for v145 (Platform Toolset = 'v145') cannot be found. T
    o build using the v145 build tools, please install v145 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and th
    en selecting "Retarget solution". [E:\Sources\Python\PCbuild\pyshellext.vcxproj]
    Done Building Project "E:\Sources\Python\PCbuild\pyshellext.vcxproj" (Build target(s)) -- FAILED.
    
    Done Building Project "E:\Sources\Python\Tools\msi\launcher\launcher.wixproj" (default targets) -- FAILED.
    
    
    Build FAILED.
    
    "E:\Sources\Python\Tools\msi\launcher\launcher.wixproj" (default target) (1) ->
    "E:\Sources\Python\PCbuild\pyshellext.vcxproj" (Build target) (2) ->
    (PrepareForBuild target) ->
      C:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Microsoft\VC\v180\Microsoft.CppBuild.targets(473,5): error MSB8020: The build tools for v145 (Platform Toolset = 'v145') cannot be found.
     To build using the v145 build tools, please install v145 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". [E:\Sources\Python\PCbuild\pyshellext.vcxproj]
    
        0 Warning(s)
        1 Error(s)
    
    Time Elapsed 00:00:00.18
  7. chris-eibl commented on Feb 21, 2026

    @chris-eibl
    MemberAuthor

    $ ./Tools/msi/buildrelease.bat -x64 --skip-nuget --skip-build

    Sorry, I cannot reproduce. This builds launcher.wixproj / pyshellext.vcxproj for me in a fresh environment and creates a working launcher.msi. But then soon later of course fails due to missing files because of --skip-build.

    Hence, I also did a "full" build

    $ ./Tools/msi/buildrelease.bat 
    

    and got a working launcher.msi, installer python-3.15.0a6-amd64.exe and python-3.15.0a6-embed-amd64.zip.

    It can currently build without modifying any files

    So it seems v145 is found in this case ...

    but packaging into an MSI bundle still fails

    ... but here it is not found in your case. This is weird, so I can only speculate: maybe you do not have v145 for x86 and arm installed? For the launcher, shellext is built in those configurations, too ...

  8. DEVwXZ4Njdmo4hm commented on Feb 22, 2026

    @DEVwXZ4Njdmo4hm

    Thanks for the reply. I can confirm your findings. Running ./Tools/msi/buildrelease.bat -x64 --skip-nuget in a clean VM environment completes without any issues.

    For context, I had previously run ./PCbuild/build.bat to generate the binaries and added --skip-build to buildrelease.bat expecting it to reuse the existing build outputs. It turns out that doing so somehow leads to the v145 not found error.

    Since it works seamlessly without the flag in a clean environment, the required toolchains are definitely present. Appreciate your time checking this!

  9. zooba commented on Feb 23, 2026

    @zooba
    Member

    @DEVwXZ4Njdmo4hm Just as a heads-up, we'll be deleting the MSI build in its entirety after 3.15 gets its own branch - it won't be part of 3.16. So if you're relying on it, you'll want to be planning to fork that part yourself at some point (or possibly just create a simpler one). See PEP 773 for more info.

  10. added 3 commits that reference this issue on Feb 28, 2026
  11. added 3 commits that reference this issue on Apr 25, 2026
  12. StanFromIreland commented on May 2, 2026

    @StanFromIreland
    Member

    Triage: @chris-eibl, is this complete?

  13. added
    type-featureA feature request or enhancement
    pendingThe issue will be closed if no feedback is provided
    on May 2, 2026
  14. chris-eibl commented on May 2, 2026

    @chris-eibl
    MemberAuthor

    Yes - the only reason I've kept it open was to remind me to switch from the preview windows-2025-vs2026 to windows-2025 once the latter officially supports VS2026 (which should happen soon). Best done after the 3.15 beta1 release I think.

    But this most probably deserves its own issue, anyway ...

  15. chris-eibl commented on May 30, 2026

    @chris-eibl
    MemberAuthor

    But this most probably deserves its own issue, anyway ...

    Done #150605, so closing here.

  16. added a commit that references this issue on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

3.15bugs and security fixesOS-windowsbuildThe build process and cross-buildpendingThe issue will be closed if no feedback is providedtype-featureA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions