Skip to content

Add support for Visual Studio 2026#242

Open
hwangsihu wants to merge 1 commit into
DOCGroup:masterfrom
hwangsihu:master
Open

Add support for Visual Studio 2026#242
hwangsihu wants to merge 1 commit into
DOCGroup:masterfrom
hwangsihu:master

Conversation

@hwangsihu
Copy link
Copy Markdown

@hwangsihu hwangsihu commented Feb 27, 2026

Summary by CodeRabbit

  • New Features

    • Adds Visual Studio 2026 (vs2026) support across project types, platforms (x64, x86/Win32, ARM, ARM64), templates for executables, libraries and DLLs, and workspace/project generation.
    • CI workflows updated to include automated Windows builds for Visual Studio 2026 configurations.
  • Documentation

    • Usage and reference docs updated to list vs2026 and its toolchain/version mapping.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d43b60dc-5cc3-458d-8c6b-c2e2eaf5c734

📥 Commits

Reviewing files that changed from the base of the PR and between c1f8752 and 86867f2.

📒 Files selected for processing (13)
  • .github/workflows/cmake.yml
  • .github/workflows/windows.yml
  • config/wireshark.mpb
  • docs/USAGE
  • docs/html/MakeProjectCreator.html
  • modules/VS2026ProjectCreator.pm
  • modules/VS2026WorkspaceCreator.pm
  • registry.pl
  • templates/vs2026dll.mpt
  • templates/vs2026exe.mpt
  • templates/vs2026lib.mpt
  • templates/vs2026libexe.mpt
  • templates/vs2026platforms.mpt
✅ Files skipped from review due to trivial changes (9)
  • config/wireshark.mpb
  • docs/USAGE
  • templates/vs2026libexe.mpt
  • registry.pl
  • templates/vs2026exe.mpt
  • templates/vs2026lib.mpt
  • templates/vs2026platforms.mpt
  • modules/VS2026WorkspaceCreator.pm
  • docs/html/MakeProjectCreator.html
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/windows.yml
  • .github/workflows/cmake.yml
  • templates/vs2026dll.mpt
  • modules/VS2026ProjectCreator.pm

Walkthrough

Adds Visual Studio 2026 support: CI matrix entries, registry/config updates, new Perl project/workspace creators, VS2026 MPC templates and platform definitions, and documentation updates including vcversion mapping.

Changes

VS2026 support

Layer / File(s) Summary
Project creator module
modules/VS2026ProjectCreator.pm
Introduces VS2026ProjectCreator, with %info and %config maps and overrides get_info_hash/get_configurable delegating to SUPER when needed.
Workspace creator
modules/VS2026WorkspaceCreator.pm
Adds VS2026WorkspaceCreator and pre_workspace to emit solution header and MPC-generated comments.
MPC templates & platforms
templates/vs2026platforms.mpt, templates/vs2026dll.mpt, templates/vs2026exe.mpt, templates/vs2026lib.mpt, templates/vs2026libexe.mpt
Adds VS2026 templates and platform definitions (Win32, x64, ARM, ARM64), default platform/toolset and per-platform settings and conditional includes.
CI/CD Workflows
.github/workflows/cmake.yml, .github/workflows/windows.yml
Adds vs2026 entries to CI matrices (cmake.yml: vs2026 VM; windows.yml: VS2026Debug64 and VS2026Release32 matrix rows with vcpkg packages configured).
Registry & Config
registry.pl, config/wireshark.mpb
Register vs2026 in %types and add specific(vs2026) under project : glib setting MSC_VER_REQUIRED=1950.
Documentation
docs/USAGE, docs/html/MakeProjectCreator.html
Document vs2026 as a supported MPC type, update exclusion example, add property/support matrix row, and map vs2026 to vcversion value 14.5.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • DOCGroup/MPC#229: Also updates GitHub Actions workflow matrices to add/adjust Visual Studio/toolchain targets.

Suggested reviewers

  • sonndinh

Poem

🐰 I hopped in code with nimble paws,
New templates sprout and CI applauds,
VS2026 now joins the race,
Solutions printed with a friendly trace,
A carrot for each build that passes!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add support for Visual Studio 2026' accurately summarizes the main change: comprehensive support additions for the new VS2026 toolchain across workflows, templates, modules, and configuration files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
templates/vs2026platforms.mpt (1)

12-14: Consider adding explicit settings for Win32 platform.

The Win32 platform block only defines output_subdir, while other platforms (x64, ARM, ARM64) also include cpu_defines, platform_defines, TargetMachine, and link_options. This may be intentional if Win32 defaults are handled elsewhere, but for consistency you might consider adding explicit values:

Suggested enhancement for Win32 platform block
 Win32 {
   output_subdir    = I386
+  cpu_defines      = _X86_
+  platform_defines = WIN32
+  TargetMachine    = "0"             // We let VC++ figure it out for us.
+  link_options     = /machine:X86
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@templates/vs2026platforms.mpt` around lines 12 - 14, The Win32 platform block
currently only sets output_subdir = I386; update the Win32 block (symbol: Win32)
to explicitly include the same platform settings used for other platforms: add
cpu_defines, platform_defines, TargetMachine, and link_options entries (matching
the style/values used for x64/ARM/ARM64) so the configuration is consistent
rather than relying on implicit defaults; ensure names match existing keys
(cpu_defines, platform_defines, TargetMachine, link_options) and values are
appropriate for 32-bit Win32.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@templates/vs2026platforms.mpt`:
- Around line 12-14: The Win32 platform block currently only sets output_subdir
= I386; update the Win32 block (symbol: Win32) to explicitly include the same
platform settings used for other platforms: add cpu_defines, platform_defines,
TargetMachine, and link_options entries (matching the style/values used for
x64/ARM/ARM64) so the configuration is consistent rather than relying on
implicit defaults; ensure names match existing keys (cpu_defines,
platform_defines, TargetMachine, link_options) and values are appropriate for
32-bit Win32.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 58a6fbe and 05a5b40.

📒 Files selected for processing (13)
  • .github/workflows/cmake.yml
  • .github/workflows/windows.yml
  • config/wireshark.mpb
  • docs/USAGE
  • docs/html/MakeProjectCreator.html
  • modules/VS2026ProjectCreator.pm
  • modules/VS2026WorkspaceCreator.pm
  • registry.pl
  • templates/vs2026dll.mpt
  • templates/vs2026exe.mpt
  • templates/vs2026lib.mpt
  • templates/vs2026libexe.mpt
  • templates/vs2026platforms.mpt

@hwangsihu hwangsihu marked this pull request as draft March 4, 2026 10:42
@hwangsihu hwangsihu marked this pull request as ready for review March 4, 2026 15:25
Comment thread config/wireshark.mpb Outdated
Comment thread docs/html/MakeProjectCreator.html Outdated
Comment thread docs/USAGE Outdated
Comment thread modules/VS2026ProjectCreator.pm Outdated
my $crlf = $self->crlf();

print $fh '', $crlf,
'Microsoft Visual Studio Solution File, Format Version 12.00', $crlf;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

format version 12?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Visual Studio 2026 generates an .slnx file instead of .sln

<Solution>
  <Configurations>
    <Platform Name="x64" />
    <Platform Name="x86" />
  </Configurations>
  <Project Path="ConsoleApplication2026.vcxproj" />
</Solution>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, the format version has been 12 since 2012.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

How about handling the SLNX issue as a separate PR later? It doesn't seem easy at the moment because the scope of the changes is too large.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be as easy as adding this method to this module?

sub workspace_file_extension {
  #my $self = shift;
  return '.slnx';
}

@mitza-oci
Copy link
Copy Markdown
Member

What else needs to be done to get this ready to merge? GitHub Actions is going to switch windows-latest/windows-2025 to VS 2026 soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants