Remove MachineIndependent configuration#13180
Merged
ViktorHofer merged 2 commits intomainfrom Feb 2, 2026
Merged
Conversation
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
Contributor
There was a problem hiding this comment.
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
MachineIndependentfrom the repo’s supportedConfigurationsand deleted the associated property group. - Simplified
src/Directory.BeforeCommon.targetsby removingMachineIndependentBuild-gated feature constants for .NET Framework builds. - Removed
MachineIndependentconfiguration/platform mappings fromMSBuild.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
approved these changes
Feb 2, 2026
rainersigwald
approved these changes
Feb 2, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The
MachineIndependentconfiguration 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
MachineIndependentfromConfigurationsproperty and deleted conditional PropertyGroupMachineIndependentBuildconditions; feature flags now unconditionally defined for .NET Framework targets:FEATURE_REGISTRY_TOOLSETS,FEATURE_REGISTRY_SDKS,FEATURE_REGISTRYHIVE_DYNDATA,FEATURE_WIN32_REGISTRYFEATURE_GACFEATURE_ENCODING_DEFAULT,FEATURE_INSTALLED_MSBUILDFEATURE_NODE_REUSE,FEATURE_NET35_TASKHOST,FEATURE_SECURITY_PERMISSIONSFEATURE_VISUALSTUDIOSETUPcondition (removed MachineIndependentBuild check)Testing
Notes
All conditional features previously disabled in MachineIndependent mode now enabled unconditionally. No behavioral change for existing Debug/Release configurations.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.