Skip to content

Add VS 2026 (v145) and WDK 10.0.28000.1839 support#309

Merged
nmlud21 merged 3 commits into
microsoft:mainfrom
shankarseal:vs2026-support
Jun 16, 2026
Merged

Add VS 2026 (v145) and WDK 10.0.28000.1839 support#309
nmlud21 merged 3 commits into
microsoft:mainfrom
shankarseal:vs2026-support

Conversation

@shankarseal

@shankarseal shankarseal commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

This PR enables building usersim with Visual Studio 2026 (toolset v145, WDK 10.0.28000.1839) while maintaining compatibility with VS 2022 (v143, WDK 10.0.26100.4204).

Changes:

  • Add conditional UsersimWindowsTargetPlatformVersion, UsersimWDKVersion, and UsersimPlatformToolset properties in wdk.props
  • Replace hardcoded 10.0.26100.0 paths with the $(WindowsTargetPlatformVersion) MSBuild property in vcxproj files
  • Add WDK 10.0.28000.1839 to packages.config for MSBuild 18

CMake build

  • Select the Windows SDK/WDK NuGet versions from MSVC_TOOLSET_VERSION (v145 → 10.0.28000, otherwise 10.0.26100), instead of hardcoding 10.0.26100.
  • cxplat_winuser include path now uses ${WDK_VERSION}.

NuGet restore

  • Removed the redundant packages.config. cxplat_winkernel already restores via wdk.props's PackageReference (conditional $(UsersimWDKVersion)), matching all sibling projects. This lets the version vary by VisualStudioVersion without duplicate package IDs, and the build path is unaffected (verified: NuGet restore succeeds via PackageReference; the CMake path uses nuget install).

Documentation

  • README.md, docs/DevelopmentGuide.md, CONTRIBUTING.md: note that VS 2026 (v145) is supported alongside VS 2022, and added the Visual Studio 18 2026 CMake generator hint.

No changes are being made to the CI pipeline.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the MSBuild/Visual Studio project configuration to support building usersim with Visual Studio 2026 (v145) and WDK 10.0.28000.1839, while retaining compatibility with VS 2022 (v143) / WDK 10.0.26100.4204 by centralizing version/toolset selection in shared MSBuild properties.

Changes:

  • Adds VS-version-conditioned properties in wdk.props for Windows SDK target version, WDK NuGet version, and platform toolset.
  • Replaces hardcoded 10.0.26100.0 include paths in multiple .vcxproj files with $(WindowsTargetPlatformVersion)-based paths.
  • Updates cxplat_winkernel NuGet package configuration to include the newer WDK package version.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
wdk.props Introduces conditional properties for SDK/WDK/toolset selection based on Visual Studio version.
usersim_dll_skeleton/usersim_dll_skeleton.vcxproj Uses centralized WindowsTargetPlatformVersion and PlatformToolset; updates WDK include path.
tests/tests.vcxproj Uses centralized WindowsTargetPlatformVersion and PlatformToolset; updates WDK include path.
src/usersim.vcxproj Uses centralized WindowsTargetPlatformVersion and PlatformToolset; updates WDK include path across configs.
setup_build/setup_build.vcxproj Uses centralized WindowsTargetPlatformVersion and PlatformToolset for the setup project.
sample/sample.vcxproj Uses centralized WindowsTargetPlatformVersion and PlatformToolset; updates WDK include path.
cxplat/src/cxplat_winuser/cxplat_winuser.vcxproj Switches WindowsTargetPlatformVersion and PlatformToolset to centralized properties.
cxplat/src/cxplat_winkernel/packages.config Adds WDK 10.0.28000.1839 entries alongside existing ones for restore.
cxplat/src/cxplat_winkernel/cxplat_winkernel.vcxproj Switches WindowsTargetPlatformVersion to centralized property for the driver project.
cxplat/cxplat_test/cxplat_test.vcxproj Switches WindowsTargetPlatformVersion/PlatformToolset to centralized properties; adjusts config blocks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wdk.props Outdated
Comment thread cxplat/cxplat_test/cxplat_test.vcxproj
Comment thread cxplat/src/cxplat_winkernel/packages.config Outdated
@nmlud21

nmlud21 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The README should be updated explaining how this PR adds VS 2026 support.

Comment thread cxplat/cxplat_test/cxplat_test.vcxproj
- Define UsersimWindowsTargetPlatformVersion and UsersimPlatformToolset in wdk.props
- Make WindowsTargetPlatformVersion conditional across all vcxproj files
- Replace hardcoded include paths with $(WindowsTargetPlatformVersion)
- Add WDK 10.0.28000.1839 to packages.config for VS 18/MSBuild 18

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nicholas Ludwig and others added 2 commits June 16, 2026 10:41
Signed-off-by: Nicholas Ludwig <nludwig@microsoft.com>
- Remove redundant packages.config from cxplat_winkernel; the project
  already restores via wdk.props PackageReference with conditional
  UsersimWDKVersion, so version selection varies by VisualStudioVersion
  without duplicate package IDs.
- Add VS 2026 (toolset v145 / WDK 10.0.28000) support to the CMake build
  by selecting NuGet/WDK versions from MSVC_TOOLSET_VERSION.
- Restore original line endings/BOM for sample.vcxproj and
  setup_build.vcxproj so the diff is limited to the property changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nmlud21 nmlud21 merged commit a8021ee into microsoft:main Jun 16, 2026
15 of 17 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in eBPF for Windows Triage Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants