-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Visual Studio 2026 support. Minimum version Visual Studio 2022. #27473
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
Conversation
|
Critical Overly broad version detection pattern (tools/buildsteps/windows/vswhere.bat:36) Suggested fix: Use a more specific pattern like |
|
Shouldn't have to touch the minimum. It's a minimum after all, not what's being used |
Does it not matter that the 'Visual Studio 2026 18' generator doesn't exist in versions before 4.2?? |
|
Thanks for trying VS 2026. I don't think BuildSetup.bat should be changed yet. |
Agree. I've marked it as draft already. |
No, because Kodi doesn't require 4.2 |
|
Adding support for VS 2026 is not the same as "forcing use VS 2026". As fuzzard says, the minimum requirements shouldn't change. Any changes should be optional and maintain backward compatibility (with VS 2022 at least).
not matter for use CMake 3.28 + VS 2022 (the minimum required) If you want use use VS 2026 you need CMake 4.2 (not released yet) |
|
Thanks for the clarification. |
|
Critical Overly broad version detection pattern remains unaddressed (tools/buildsteps/windows/vswhere.bat:36) Fix: Use |
|
Not necessary in this PR but as you are here maybe remove support of Visual Studio 2015 removing this block: IF %vcvars%==no (
FOR /f "usebackq tokens=1* delims=" %%i in (`%vswhere% -legacy -property installationPath`) do (
ECHO %%i | findstr "14" >NUL 2>NUL
IF NOT ERRORLEVEL 1 (
IF EXIST "%%i\VC\vcvarsall.bat" (
SET vcvars="%%i\VC\vcvarsall.bat"
SET vsver=14 2015
)
)
)
) |
|
@thexai, thanks - done. Shall I also simplify: If VS 2022 is the minimum required. |
|
@claude review. |
|
Claude finished @78andyp's task —— View job Code Review for PR #27473
SummaryThis PR adds Visual Studio 2026 support and removes VS 2015/2017 legacy support from What's Good ✓
Issue to AddressVS 2026 detection pattern (line 36-37) The current detection pattern The escaped backslashes (
One potential edge case to consider: If VS 2026's installation path actually contains Minor SuggestionLine 31 still defaults to
This is a low-priority suggestion since the current behavior still works. VerdictThe PR looks good and ready to merge once there's confirmation that the VS 2026 installation path structure uses |
|
@claude review |
|
Claude finished @78andyp's task —— View job Code Review for PR #27473
SummaryThis PR adds Visual Studio 2026 support and removes VS 2015/2017/2019 legacy support from What's Good ✓
Issues to Address1. VS 2026 detection pattern (lines 32-34) The pattern
This appears correct assuming VS 2026 uses 2. Inconsistent indentation (line 32) SET vsver=17 2022
rem Default path for VS2026 does not include text 2026Line 32 uses a tab character for indentation while the surrounding lines use spaces. This should be corrected for consistency: SET vsver=17 2022
rem Default path for VS2026 does not include text 20263. Missing VS 2019 detection (potential issue) The current implementation defaults to VS 2022 ( However, since VS 2022 is now the minimum supported version, users with only VS 2019 should not be using this build system. You may want to add an explicit check/warning if an older VS version is detected, or document that VS 2019 is no longer supported. Minor Suggestions
VerdictThe PR is well-structured and achieves its goals. The main items to address are:
Once the indentation is fixed, this should be ready to merge. |
docs/README.Windows.md
Outdated
| To build Kodi: | ||
| * **Windows** 64bit OS, Windows 10 or above (allows build of x64, win32, ARM64, UWP-64 and UWP-32) | ||
| * **[CMake](https://cmake.org/download/)** version 3.28 or greater | ||
| * **[CMake](https://cmake.org/download/)** version 3.28 or greater for Visual Studio 2022, version 4.2 or greater for Visual Studio 2026 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 4.2 or greater seems wrong
The below is output of cmake version installed with Visual Studio 2026 Community Edition
C:\Program Files\Microsoft Visual Studio\18\Community>cmake --version
cmake version 4.1.1-msvc1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd. From the changelog https://cmake.org/cmake/help/latest/release/4.2.html

I wonder if VS shipped with a custom version prior to 4.2 full release.
There was also a bug in 4.2RC that prevented building without intervention - I don't know it that was present in 4.1.1 - I will try and set up a VM and check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fuzzard - just done some tests
Win11 25H2 in VM with VS Comm 2026 - compiles fine (included CMake v4.1.1-msvc)
Then installed CMake 4.1.4 (latest from 4.1.x branch)
Compile fails:

Works again wtih CMake 4.2.1.
Updated readme to reflect this.
The minimum version is Visual Studio 2022.
|
Jenkins build this please |
fuzzard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok to me
| * Select the optional component: `Universal Windows Platform tools` | ||
| * Select the optional component: `C++ (v143) Universal Windows Platform tools` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines went missing.
I don't remember if "Universal Windows Platform tools" is selected by default in VS 2022
However I know runtime 1.43 has to be selected explicitly in the installer (no runtime selected by default). Not sure if it would build without, but you would end up with local settings different from the official build (and most devs at this point)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those options don't seem to exist any more.
Also did a test install of VS2026 Community in a VM with just the main components selected and built kodi fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe they don't exist for VS 2026 but VS 2022 is still the official tool and until deprecated (2019 was only recently removed!), the instructions need to support both versions.
| Click in **Individual components** select | ||
| * Under **Compilers, build tools and runtimes** section select | ||
| * `MSVC v143 - VS 2022 C++ ARM64 build tools (Latest)` (if compiling for ARM64) | ||
| * `MSVC Build Tools for ARM64/ARM64EC (Latest)` (if compiling for ARM64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That option does not exist in the VS 2022 installer, only explicitly spelled out version, like the previous version of the readme had. Should be 1.43 for consistency with official builds/other devs, not 1.41 or 1.42
Is the version-less option new in VS 2026?
Description
To allow Kodi to compile for VS 2026 on windows.
Remove support for VS versions prior to 2022.
Needs CMAKE v4.2+
Motivation and context
VS 2026 support.
How has this been tested?
Locally.
What is the effect on users?
Screenshots (if appropriate):
Types of change
Checklist: