Allow explicit Windows SDK version #23253
reynoldsbd
started this conversation in
Ideas
Replies: 3 comments 5 replies
-
I think you can do this by setting the |
Beta Was this translation helpful? Give feedback.
2 replies
-
@BillyONeal @vicroms @ras0219-msft Could you please help take a look this issue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
@Cheney-W I don't expect such a feature is going to make the cut line soon. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
For the sake of stability and reproducibility, my team prefers to build against an explicit version of the Windows SDK, e.g. 10.0.18362.0.
However, when loading its Visual Studio shell environment, vcpkg currently does not specify any particular version of the SDK. vcvarsall.bat will thus choose the latest available version. This limits our ability to control which version of the SDK is used when building vcpkg dependencies.
Proposed solution
Add a mechanism by which users may specify an explicit version of the Windows SDK to use. When calling vcvarsall.bat, vcpkg will pass the specified value using the
-winsdk=<ver>
argument.I propose exposing this mechanism to the user by way of a new triplet variable, tentatively named
VCPKG_PLATFORM_SDK_VERSION
.Describe alternatives you've considered
It is technically possible to build with a specific Windows SDK version by simply uninstalling any newer versions of the SDK before running vcpkg. This is obviously cumbersome, particularly for users who may jump between projects with different SDK requirements.
My team is currently applying a patch to vcpkg-tool and bootstrapping manually. This patch is a very trivial hack which reads from an env var and injects the desired
-winsdk=<ver>
argument within visualstudio.cpp. Definitely not something that would be accepted upstream.Additional context
I'm more than happy to submit a PR for this proposal. Just wanted to open this issue first to hash out the details and get feedback.
Unless there are objections, I plan on largely copying from microsoft/vcpkg-tool#199 which introduced
VCPKG_PLATFORM_TOOLSET_VERSION
.Beta Was this translation helpful? Give feedback.
All reactions