Skip to content

Commit c1d5007

Browse files
authored
Remove MachineIndependent configuration (#13180)
### 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.
1 parent 7744bc9 commit c1d5007

3 files changed

Lines changed: 13 additions & 282 deletions

File tree

Directory.Build.props

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<PropertyGroup>
1111
<Product>Microsoft® Build Tools®</Product>
12-
<Configurations>Debug;Release;MachineIndependent</Configurations>
12+
<Configurations>Debug;Release</Configurations>
1313
</PropertyGroup>
1414

1515
<PropertyGroup>
@@ -69,15 +69,6 @@ ates https://learn.microsoft.com/en-gb/dotnet/fundamentals/syslib-diagnostics/sy
6969
<NoWarn Condition="'$(DotNetBuild)' == 'true'">$(NoWarn);NU5104;</NoWarn>
7070
</PropertyGroup>
7171

72-
<!-- Configuration MSBuild for portable (xcopy-install) toolsets: works on WinNT and linux/mac via Mono, isolates from machine environment:
73-
uses only tools installed with it, ignores Registry and GAC and Visual Studio installations to provide the same build experience on all machines -->
74-
<PropertyGroup Condition="'$(Configuration)' == 'MachineIndependent'">
75-
<DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
76-
<Optimize Condition="'$(Optimize)' == ''">true</Optimize>
77-
<DebugType Condition="'$(DebugType)' == ''">none</DebugType>
78-
<MachineIndependentBuild>true</MachineIndependentBuild>
79-
</PropertyGroup>
80-
8172
<PropertyGroup>
8273
<DefaultItemExcludes>$(DefaultItemExcludes);*.log</DefaultItemExcludes>
8374
<DefaultItemExcludes>$(DefaultItemExcludes);*.binlog</DefaultItemExcludes>

0 commit comments

Comments
 (0)