Skip to content

Remove MachineIndependent configuration#13180

Merged
ViktorHofer merged 2 commits intomainfrom
copilot/remove-machineindependent-config
Feb 2, 2026
Merged

Remove MachineIndependent configuration#13180
ViktorHofer merged 2 commits intomainfrom
copilot/remove-machineindependent-config

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

Context

The MachineIndependent configuration enabled portable/xcopy MSBuild toolsets for Mono environments by disabling machine-specific features (registry, GAC, Visual Studio integration). With Mono EOL, this mode is obsolete.

Changes Made

  • Directory.Build.props: Removed MachineIndependent from Configurations property and deleted conditional PropertyGroup
  • src/Directory.BeforeCommon.targets: Removed 12 MachineIndependentBuild conditions; feature flags now unconditionally defined for .NET Framework targets:
    • Registry access: FEATURE_REGISTRY_TOOLSETS, FEATURE_REGISTRY_SDKS, FEATURE_REGISTRYHIVE_DYNDATA, FEATURE_WIN32_REGISTRY
    • GAC: FEATURE_GAC
    • Environment: FEATURE_ENCODING_DEFAULT, FEATURE_INSTALLED_MSBUILD
    • Build features: FEATURE_NODE_REUSE, FEATURE_NET35_TASKHOST, FEATURE_SECURITY_PERMISSIONS
    • Simplified FEATURE_VISUALSTUDIOSETUP condition (removed MachineIndependentBuild check)
  • MSBuild.sln: Removed 260 lines of MachineIndependent platform configurations

Testing

  • Full build passes (Debug/Release configurations)
  • Framework and Build.Engine unit tests pass
  • Bootstrap environment and sample builds functional

Notes

All conditional features previously disabled in MachineIndependent mode now enabled unconditionally. No behavioral change for existing Debug/Release configurations.

Original prompt

This section details on the original issue you should resolve

<issue_title>Consider removing the MachineIndependent configuration</issue_title>
<issue_description>https://github.com/search?q=repo%3Adotnet%2Fmsbuild%20MachineIndependentBuild&type=code

From what I know, this configuration is used to create a portable / xcopy msbuild environment. Now that Mono is EOL and VS changing to a rapid release cadence, I don't see much value in keeping this support and the ifdefs that come with, alive.

@rainersigwald opinions?</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hello @@copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.

Co-authored-by: ViktorHofer <7412651+ViktorHofer@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove MachineIndependent configuration support Remove MachineIndependent configuration Feb 2, 2026
Copilot AI requested a review from ViktorHofer February 2, 2026 15:16
@ViktorHofer ViktorHofer marked this pull request as ready for review February 2, 2026 15:27
@ViktorHofer ViktorHofer requested a review from a team as a code owner February 2, 2026 15:27
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

Removes the obsolete MachineIndependent build configuration (previously used for Mono/xcopy toolsets) and simplifies related conditional feature flags now that Mono is EOL.

Changes:

  • Removed MachineIndependent from the repo’s supported Configurations and deleted the associated property group.
  • Simplified src/Directory.BeforeCommon.targets by removing MachineIndependentBuild-gated feature constants for .NET Framework builds.
  • Removed MachineIndependent configuration/platform mappings from MSBuild.sln.

Reviewed changes

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

File Description
Directory.Build.props Drops MachineIndependent from configurations and removes the configuration-specific property group.
src/Directory.BeforeCommon.targets Makes previously MachineIndependent-gated feature defines unconditional for relevant TFMs.
MSBuild.sln Removes solution configuration entries for MachineIndependent across projects/platforms.

@ViktorHofer ViktorHofer enabled auto-merge (squash) February 2, 2026 16:44
@ViktorHofer ViktorHofer merged commit c1d5007 into main Feb 2, 2026
15 checks passed
@ViktorHofer ViktorHofer deleted the copilot/remove-machineindependent-config branch February 2, 2026 19:17
Copilot AI added a commit that referenced this pull request Feb 3, 2026
### Context

The `MachineIndependent` configuration enabled portable/xcopy MSBuild
toolsets for Mono environments by disabling machine-specific features
(registry, GAC, Visual Studio integration). With Mono EOL, this mode is
obsolete.

### Changes Made

- **Directory.Build.props**: Removed `MachineIndependent` from
`Configurations` property and deleted conditional PropertyGroup
- **src/Directory.BeforeCommon.targets**: Removed 12
`MachineIndependentBuild` conditions; feature flags now unconditionally
defined for .NET Framework targets:
- Registry access: `FEATURE_REGISTRY_TOOLSETS`, `FEATURE_REGISTRY_SDKS`,
`FEATURE_REGISTRYHIVE_DYNDATA`, `FEATURE_WIN32_REGISTRY`
  - GAC: `FEATURE_GAC`
  - Environment: `FEATURE_ENCODING_DEFAULT`, `FEATURE_INSTALLED_MSBUILD`
- Build features: `FEATURE_NODE_REUSE`, `FEATURE_NET35_TASKHOST`,
`FEATURE_SECURITY_PERMISSIONS`
- Simplified `FEATURE_VISUALSTUDIOSETUP` condition (removed
MachineIndependentBuild check)
- **MSBuild.sln**: Removed 260 lines of MachineIndependent platform
configurations

### Testing

- Full build passes (Debug/Release configurations)
- Framework and Build.Engine unit tests pass
- Bootstrap environment and sample builds functional

### Notes

All conditional features previously disabled in MachineIndependent mode
now enabled unconditionally. No behavioral change for existing
Debug/Release configurations.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Consider removing the MachineIndependent
configuration</issue_title>
>
<issue_description>https://github.com/search?q=repo%3Adotnet%2Fmsbuild%20MachineIndependentBuild&type=code
> 
> From what I know, this configuration is used to create a portable /
xcopy msbuild environment. Now that Mono is EOL and VS changing to a
rapid release cadence, I don't see much value in keeping this support
and the ifdefs that come with, alive.
> 
> @rainersigwald opinions?</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #13060

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/dotnet/msbuild/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
JanProvaznik pushed a commit to JanProvaznik/msbuild that referenced this pull request Feb 25, 2026
### Context

The `MachineIndependent` configuration enabled portable/xcopy MSBuild
toolsets for Mono environments by disabling machine-specific features
(registry, GAC, Visual Studio integration). With Mono EOL, this mode is
obsolete.

### Changes Made

- **Directory.Build.props**: Removed `MachineIndependent` from
`Configurations` property and deleted conditional PropertyGroup
- **src/Directory.BeforeCommon.targets**: Removed 12
`MachineIndependentBuild` conditions; feature flags now unconditionally
defined for .NET Framework targets:
- Registry access: `FEATURE_REGISTRY_TOOLSETS`, `FEATURE_REGISTRY_SDKS`,
`FEATURE_REGISTRYHIVE_DYNDATA`, `FEATURE_WIN32_REGISTRY`
  - GAC: `FEATURE_GAC`
  - Environment: `FEATURE_ENCODING_DEFAULT`, `FEATURE_INSTALLED_MSBUILD`
- Build features: `FEATURE_NODE_REUSE`, `FEATURE_NET35_TASKHOST`,
`FEATURE_SECURITY_PERMISSIONS`
- Simplified `FEATURE_VISUALSTUDIOSETUP` condition (removed
MachineIndependentBuild check)
- **MSBuild.sln**: Removed 260 lines of MachineIndependent platform
configurations

### Testing

- Full build passes (Debug/Release configurations)
- Framework and Build.Engine unit tests pass
- Bootstrap environment and sample builds functional

### Notes

All conditional features previously disabled in MachineIndependent mode
now enabled unconditionally. No behavioral change for existing
Debug/Release configurations.

<!-- START COPILOT ORIGINAL PROMPT -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Consider removing the MachineIndependent
configuration</issue_title>
>
<issue_description>https://github.com/search?q=repo%3Adotnet%2Fmsbuild%20MachineIndependentBuild&type=code
> 
> From what I know, this configuration is used to create a portable /
xcopy msbuild environment. Now that Mono is EOL and VS changing to a
rapid release cadence, I don't see much value in keeping this support
and the ifdefs that come with, alive.
> 
> @rainersigwald opinions?</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> </comments>
> 


</details>



<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes dotnet#13060

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/dotnet/msbuild/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.
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.

Consider removing the MachineIndependent configuration

4 participants