Skip to content

Build the C# projection for AnyCPU#40582

Merged
florelis merged 1 commit into
microsoft:masterfrom
florelis:csAnyCpu
May 19, 2026
Merged

Build the C# projection for AnyCPU#40582
florelis merged 1 commit into
microsoft:masterfrom
florelis:csAnyCpu

Conversation

@florelis
Copy link
Copy Markdown
Member

Summary of the Pull Request

The C# projection binary should be built for AnyCPU. I intended for it to do that by not setting the platform explicitly and relying on the default, but that still built for a specific platform due to the global settings. This sets the target to AnyCPU explicitly.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings May 18, 2026 21:16
@florelis florelis requested a review from a team as a code owner May 18, 2026 21:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Forces the C# projection (wslcsdkcs) to build for AnyCPU by explicitly setting the relevant MSBuild global properties via CMake.

Changes:

  • Add VS_GLOBAL_Platform, VS_GLOBAL_Platforms, and VS_GLOBAL_PlatformTarget properties set to AnyCPU on the wslcsdkcs target.

Copy link
Copy Markdown
Member

@JohnMcPMS JohnMcPMS left a comment

Choose a reason for hiding this comment

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

Is this a shotgun approach or do we need to set all of these values?

@florelis
Copy link
Copy Markdown
Member Author

Is this a shotgun approach or do we need to set all of these values?

Shotgun approach. It matches what wslsettings does. It's not immediately clear to me which of these are set by the VS generator from ${TARGET_PLATFORM} or ${CMAKE_GENERATOR_PLATFORM}, so it's just easier to set all.

@florelis florelis merged commit 6099eb5 into microsoft:master May 19, 2026
13 checks passed
@florelis florelis deleted the csAnyCpu branch May 19, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants