diff --git a/documentation/Property-tracking-capabilities.md b/documentation/Property-tracking-capabilities.md index 82da6332388..dd63394acb2 100644 --- a/documentation/Property-tracking-capabilities.md +++ b/documentation/Property-tracking-capabilities.md @@ -25,7 +25,7 @@ The feature implements specialized event handling for four tracking scenarios (p 1. `PropertyReassignmentEventArgs` - Triggered when a property value is changed - `set MsBuildLogPropertyTracking=1` - - **Note:** Property reassignment tracking is automatically enabled with ChangeWaves.Wave17_10, even when `MsBuildLogPropertyTracking=0` + - **Note:** Property reassignment tracking is enabled by default, even when `MsBuildLogPropertyTracking=0` 2. `PropertyInitialValueSetEventArgs` - Triggered when a property is first initialized @@ -49,6 +49,6 @@ If you want to enable all these events reporting, enable it by `set MsBuildLogPr Property reassignment tracking has special enabling logic. It is enabled when: - `PropertyReassignment` flag is explicitly set (value includes `1`), OR -- `MsBuildLogPropertyTracking=0` AND ChangeWaves.Wave17_10 features are enabled +- `MsBuildLogPropertyTracking=0` -This means that in projects with Wave17_10 enabled, property reassignments will be tracked even when property tracking appears to be disabled. +This means that property reassignments will be tracked even when property tracking appears to be disabled. diff --git a/documentation/aot/sdk-resolution.md b/documentation/aot/sdk-resolution.md index d1fd15e11da..812ff999664 100644 --- a/documentation/aot/sdk-resolution.md +++ b/documentation/aot/sdk-resolution.md @@ -71,10 +71,6 @@ Knobs: * `MSBUILDADDITIONALSDKRESOLVERSFOLDER` (and `_NET` / `_NETFRAMEWORK` variants) - test hook that adds an override resolver folder. * `MSBUILDINCLUDEDEFAULTSDKRESOLVER=false` - drop the built-in default resolver. -* Legacy path: when ChangeWave 17.10 is **disabled**, `SdkResolverService` uses a - non-caching `SdkResolverLoader` and the eager `LoadAllResolvers`, which scans - `MSBuildToolsDirectory32\SdkResolvers` and loads **every** resolver up front. The default - (17.10 enabled) path is manifest-based and lazy via `CachingSdkResolverLoader`. ### 1.3 The built-in fallback resolver @@ -319,10 +315,6 @@ through the guard: `SdkResolverLoader.LoadResolverAssembly`, `GetResolverTypes`, `LoadResolvers`, `LoadResolversFromManifest`, `LoadAllResolvers`, and `CachingSdkResolverLoader.LoadResolversFromManifest`. -Legacy note: the `LoadAllResolvers` path (only used when ChangeWave 17.10 is disabled) is also -reflective. Either apply the same guard there, or document that disabling Wave17.10 is not part -of the trim-safe contract (the default, caching, manifest-based path is what trims). - ### 2.5 Step 4 - the error resource Add to [src/Build/Resources/Strings.resx](../../src/Build/Resources/Strings.resx) (assigned `MSB4282`; diff --git a/documentation/wiki/ChangeWaves.md b/documentation/wiki/ChangeWaves.md index 13f4a8b5666..9af7b8f7760 100644 --- a/documentation/wiki/ChangeWaves.md +++ b/documentation/wiki/ChangeWaves.md @@ -59,37 +59,6 @@ Change wave checks around features will be removed in the release that accompani ### 18.4 - [Start throwing on null or empty paths in MultiProcess and MultiThreaded Task Environment Drivers.](https://github.com/dotnet/msbuild/pull/12914) -## Change waves that will be removed in the release accompanying .NET 11 - -### 18.3 -- [Replace Transactional property with ChangeWave control, implement atomic file replacement with retry logic, and update tests.](https://github.com/dotnet/msbuild/pull/12627) - -### 17.14 -- ~[.SLNX support - use the new parser for .sln and .slnx](https://github.com/dotnet/msbuild/pull/10836)~ reverted after compat problems discovered -- ~~[Support custom culture in RAR](https://github.com/dotnet/msbuild/pull/11000)~~ - see [11607](https://github.com/dotnet/msbuild/pull/11607) for details -- [VS Telemetry](https://github.com/dotnet/msbuild/pull/11255) - -### 17.12 -- [Log TaskParameterEvent for scalar parameters](https://github.com/dotnet/msbuild/pull/9908) -- [Convert.ToString during a property evaluation uses the InvariantCulture for all types](https://github.com/dotnet/msbuild/pull/9874) -- [Fix oversharing of build results in ResultsCache](https://github.com/dotnet/msbuild/pull/9987) -- [Add ParameterName and PropertyName to TaskParameterEventArgs](https://github.com/dotnet/msbuild/pull/10130) -- [Emit eval props if requested by any sink](https://github.com/dotnet/msbuild/pull/10243) -- [Load Microsoft.DotNet.MSBuildSdkResolver into default load context (MSBuild.exe only)](https://github.com/dotnet/msbuild/pull/10603) - -### 17.10 -- [AppDomain configuration is serialized without using BinFmt](https://github.com/dotnet/msbuild/pull/9320) - feature can be opted out only if [BinaryFormatter](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.serialization.formatters.binary.binaryformatter) is allowed at runtime by editing `MSBuild.runtimeconfig.json`. **Please note that [any usage of BinaryFormatter is insecure](https://learn.microsoft.com/dotnet/standard/serialization/binaryformatter-security-guide).** -- [Warning on serialization custom events by default in .NET framework](https://github.com/dotnet/msbuild/pull/9318) -- [Cache SDK resolver data process-wide](https://github.com/dotnet/msbuild/pull/9335) -- [Target parameters will be unquoted](https://github.com/dotnet/msbuild/pull/9452), meaning the ';' symbol in the parameter target name will always be treated as separator -- [Add Link metadata to Resources in AssignLinkMetadata target](https://github.com/dotnet/msbuild/pull/9464) -- [Change Version switch output to finish with a newline](https://github.com/dotnet/msbuild/pull/9485) -- [Load NuGet.Frameworks into secondary AppDomain (MSBuild.exe only)](https://github.com/dotnet/msbuild/pull/9446) -- [Update Traits when environment has been changed](https://github.com/dotnet/msbuild/pull/9655) -- [Exec task does not trim leading whitespaces for ConsoleOutput](https://github.com/dotnet/msbuild/pull/9722) -- [Introduce [MSBuild]::StableStringHash overloads](https://github.com/dotnet/msbuild/issues/9519) -- [Keep the encoding of standard output & error consistent with the console code page for ToolTask](https://github.com/dotnet/msbuild/pull/9539) - ## Change Waves No Longer In Rotation ### 16.8 @@ -140,3 +109,36 @@ Change wave checks around features will be removed in the release that accompani - [Delete destination file before copy](https://github.com/dotnet/msbuild/pull/8685) - [Moving from SHA1 to SHA256 for Hash task](https://github.com/dotnet/msbuild/pull/8812) - [Deprecating custom derived BuildEventArgs](https://github.com/dotnet/msbuild/pull/8917) - feature can be opted out only if [BinaryFormatter](https://learn.microsoft.com/dotnet/api/system.runtime.serialization.formatters.binary.binaryformatter) is allowed at runtime by editing `MSBuild.runtimeconfig.json` + +### 17.10 + +- [AppDomain configuration is serialized without using BinFmt](https://github.com/dotnet/msbuild/pull/9320) - feature can be opted out only if [BinaryFormatter](https://learn.microsoft.com/en-us/dotnet/api/system.runtime.serialization.formatters.binary.binaryformatter) is allowed at runtime by editing `MSBuild.runtimeconfig.json`. **Please note that [any usage of BinaryFormatter is insecure](https://learn.microsoft.com/dotnet/standard/serialization/binaryformatter-security-guide).** +- [Warning on serialization custom events by default in .NET framework](https://github.com/dotnet/msbuild/pull/9318) +- [Cache SDK resolver data process-wide](https://github.com/dotnet/msbuild/pull/9335) +- [Target parameters will be unquoted](https://github.com/dotnet/msbuild/pull/9452), meaning the ';' symbol in the parameter target name will always be treated as separator +- [Add Link metadata to Resources in AssignLinkMetadata target](https://github.com/dotnet/msbuild/pull/9464) +- [Change Version switch output to finish with a newline](https://github.com/dotnet/msbuild/pull/9485) +- [Load NuGet.Frameworks into secondary AppDomain (MSBuild.exe only)](https://github.com/dotnet/msbuild/pull/9446) +- [Update Traits when environment has been changed](https://github.com/dotnet/msbuild/pull/9655) +- [Exec task does not trim leading whitespaces for ConsoleOutput](https://github.com/dotnet/msbuild/pull/9722) +- [Introduce [MSBuild]::StableStringHash overloads](https://github.com/dotnet/msbuild/issues/9519) +- [Keep the encoding of standard output & error consistent with the console code page for ToolTask](https://github.com/dotnet/msbuild/pull/9539) + +### 17.12 + +- [Log TaskParameterEvent for scalar parameters](https://github.com/dotnet/msbuild/pull/9908) +- [Convert.ToString during a property evaluation uses the InvariantCulture for all types](https://github.com/dotnet/msbuild/pull/9874) +- [Fix oversharing of build results in ResultsCache](https://github.com/dotnet/msbuild/pull/9987) +- [Add ParameterName and PropertyName to TaskParameterEventArgs](https://github.com/dotnet/msbuild/pull/10130) +- [Emit eval props if requested by any sink](https://github.com/dotnet/msbuild/pull/10243) +- [Load Microsoft.DotNet.MSBuildSdkResolver into default load context (MSBuild.exe only)](https://github.com/dotnet/msbuild/pull/10603) + +### 17.14 + +- ~[.SLNX support - use the new parser for .sln and .slnx](https://github.com/dotnet/msbuild/pull/10836)~ reverted after compat problems discovered +- ~~[Support custom culture in RAR](https://github.com/dotnet/msbuild/pull/11000)~~ - see [11607](https://github.com/dotnet/msbuild/pull/11607) for details +- [VS Telemetry](https://github.com/dotnet/msbuild/pull/11255) + +### 18.3 + +- [Replace Transactional property with ChangeWave control, implement atomic file replacement with retry logic, and update tests.](https://github.com/dotnet/msbuild/pull/12627) \ No newline at end of file diff --git a/documentation/wiki/Results-Cache.md b/documentation/wiki/Results-Cache.md index c3e6609708a..b3e5f5f0175 100644 --- a/documentation/wiki/Results-Cache.md +++ b/documentation/wiki/Results-Cache.md @@ -31,7 +31,6 @@ MSBuild uses caching to speed up builds. It does this by remembering the outcome ### How `BuildRequestDataFlags` Affect Caching When MSBuild decides to build something, the request (`BuildRequest`) carries special instructions called `BuildRequestDataFlags`. These flags tell MSBuild *how* to perform the build and *what kind of result* is expected. The `ResultsCache` pays close attention to these flags because they are crucial for determining if a cached outcome is truly a match for a new request. -It's an out-in feature that can be disabled with change wave `17.12`. See more details in [ChangeWaves.md](ChangeWaves.md) Here's how some important flags interact with caching: diff --git a/eng/BootStrapMsBuild.targets b/eng/BootStrapMsBuild.targets index 8a99144d8d6..0f2dc763b64 100644 --- a/eng/BootStrapMsBuild.targets +++ b/eng/BootStrapMsBuild.targets @@ -305,6 +305,30 @@ + + + <_AcquiredSdkCurrentFile Include="$(InstallDir)sdk\$(BootstrapSdkVersion)\Current\*.*" /> + <_FreshlyBuiltCurrentFile Include="$(OutDir)%(_AcquiredSdkCurrentFile.Filename)%(_AcquiredSdkCurrentFile.Extension)" + Condition="Exists('$(OutDir)%(_AcquiredSdkCurrentFile.Filename)%(_AcquiredSdkCurrentFile.Extension)')" /> + + + + - - - - - - - "; - testEnv.CreateFile($"TestProject{i + 1}.csproj", projectContent); - } - - // Build using ProjectCollection as recommended by Change Waves documentation - using (var collection = new ProjectCollection( - globalProperties: null, - loggers: null, - remoteLoggers: null, - toolsetDefinitionLocations: ToolsetDefinitionLocations.Default, - maxNodeCount: Environment.ProcessorCount, - onlyLogCriticalEvents: false)) - { - var project = collection.LoadProject(parallelProjectFile); - var buildSucceeded = project.Build("Build"); - - // With non-transactional mode and concurrent writes, build may fail due to file locking - // or succeed with data loss. Either outcome demonstrates the problem with non-transactional mode. - // If build succeeded, verify data loss occurred - if (buildSucceeded) - { - - var content = File.ReadAllText(outputFile); - var lines = content.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries); - - var expectedWithoutRace = projectCount * 5; - - // Without transactional mode and with Overwrite=true, concurrent writes will overwrite each other - // We expect significant data loss - only the last write(s) will survive - lines.Length.ShouldBeLessThan(expectedWithoutRace, - $"Without transactional mode, data loss should occur. " + - $"Expected significant data loss from {expectedWithoutRace} lines, but got {lines.Length}"); - - // With Overwrite=true and parallel builds without transactional mode, - // only the last few writes should survive (typically 1-5 lines) - lines.Length.ShouldBeLessThanOrEqualTo(5, - "With Overwrite=true and parallel builds without transactional mode, " + - "only last project's writes should survive due to race conditions"); - } - // If build failed, that's also acceptable - it demonstrates file locking issues with non-transactional mode - } - } - } } } diff --git a/src/Tasks/CreateCSharpManifestResourceName.cs b/src/Tasks/CreateCSharpManifestResourceName.cs index a674351db1c..0f3190d1150 100644 --- a/src/Tasks/CreateCSharpManifestResourceName.cs +++ b/src/Tasks/CreateCSharpManifestResourceName.cs @@ -118,8 +118,8 @@ internal static string CreateManifestNameImpl( else { info = Culture.GetItemCultureInfo(embeddedFileName, dependentUponFileName, treatAsCultureNeutral); + // If the item has a culture override, respect that. - // We need to recheck here due to changewave in condition above - after Wave17_14 removal, this should be unconditional. if (!string.IsNullOrEmpty(culture)) { info.culture = culture; diff --git a/src/Tasks/CreateVisualBasicManifestResourceName.cs b/src/Tasks/CreateVisualBasicManifestResourceName.cs index 40c0224dc8c..7434b808a65 100644 --- a/src/Tasks/CreateVisualBasicManifestResourceName.cs +++ b/src/Tasks/CreateVisualBasicManifestResourceName.cs @@ -117,8 +117,8 @@ internal static string CreateManifestNameImpl( else { info = Culture.GetItemCultureInfo(embeddedFileName, dependentUponFileName, treatAsCultureNeutral); + // If the item has a culture override, respect that. - // We need to recheck here due to changewave in condition above - after Wave17_14 removal, this should be unconditional. if (!string.IsNullOrEmpty(culture)) { info.culture = culture; diff --git a/src/Tasks/Exec.cs b/src/Tasks/Exec.cs index 86007eb17d1..f844eaac873 100644 --- a/src/Tasks/Exec.cs +++ b/src/Tasks/Exec.cs @@ -396,9 +396,7 @@ protected override void LogEventsFromTextOutput(string singleLine, MessageImport if (ConsoleToMSBuild) { - string trimmedTextLine = ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_10) ? - singleLine.TrimEnd() : - singleLine.Trim(); + string trimmedTextLine = singleLine.TrimEnd(); if (trimmedTextLine.Length > 0) { @@ -605,11 +603,6 @@ protected internal override void AddCommandLineCommands(CommandLineBuilderExtens { commandLine.AppendSwitch("-c"); commandLine.AppendTextUnquoted(" \""); - bool setLocale = !ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_10); - if (setLocale) - { - commandLine.AppendTextUnquoted("export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; "); - } commandLine.AppendTextUnquoted(". "); commandLine.AppendFileNameIfNotNull(batchFileForCommandLine); commandLine.AppendTextUnquoted("\""); diff --git a/src/Tasks/FileIO/WriteLinesToFile.cs b/src/Tasks/FileIO/WriteLinesToFile.cs index 6056b3442f9..fec84d449a9 100644 --- a/src/Tasks/FileIO/WriteLinesToFile.cs +++ b/src/Tasks/FileIO/WriteLinesToFile.cs @@ -131,43 +131,7 @@ public override bool Execute() } } - // Use transactional mode by default when ChangeWave 18.3 is enabled - if (ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave18_3)) - { - return ExecuteTransactional(filePath, directoryPath, contentsAsString, encoding); - } - else - { - return ExecuteNonTransactional(filePath, directoryPath, contentsAsString, encoding); - } - } - - private bool ExecuteNonTransactional(AbsolutePath filePath, string directoryPath, string contentsAsString, Encoding encoding) - { - try - { - if (Overwrite) - { - System.IO.File.WriteAllText(filePath, contentsAsString, encoding); - } - else - { - if (WriteOnlyWhenDifferent) - { - Log.LogMessageFromResources(MessageImportance.Normal, "WriteLinesToFile.UnusedWriteOnlyWhenDifferent", filePath.OriginalValue); - } - - System.IO.File.AppendAllText(filePath, contentsAsString, encoding); - } - - return !Log.HasLoggedErrors; - } - catch (Exception e) when (ExceptionHandling.IsIoRelatedException(e)) - { - string lockedFileMessage = LockCheck.GetLockedFileMessage(filePath); - Log.LogErrorWithCodeFromResources("WriteLinesToFile.ErrorOrWarning", filePath.OriginalValue, e.Message, lockedFileMessage); - return !Log.HasLoggedErrors; - } + return ExecuteTransactional(filePath, directoryPath, contentsAsString, encoding); } private bool ExecuteTransactional(AbsolutePath filePath, string directoryPath, string contentsAsString, Encoding encoding) diff --git a/src/Tasks/Microsoft.Common.CrossTargeting.targets b/src/Tasks/Microsoft.Common.CrossTargeting.targets index 15ddf7563ea..1c9d0c555b1 100644 --- a/src/Tasks/Microsoft.Common.CrossTargeting.targets +++ b/src/Tasks/Microsoft.Common.CrossTargeting.targets @@ -262,7 +262,7 @@ Copyright (C) Microsoft Corporation. All rights reserved. the pre-restore files in the binary log and then NuGet won't be able to embed the generated one after restore. If some other project extension mechanism wants to import project extensions during restore, they need to explicitly set ImportProjectExtensionTargets --> - false + false true diff --git a/src/Tasks/Microsoft.Common.CurrentVersion.targets b/src/Tasks/Microsoft.Common.CurrentVersion.targets index b737725cca4..48e33865ae4 100644 --- a/src/Tasks/Microsoft.Common.CurrentVersion.targets +++ b/src/Tasks/Microsoft.Common.CurrentVersion.targets @@ -1387,11 +1387,11 @@ Copyright (C) Microsoft Corporation. All rights reserved. + Condition="'@(Resource)' != '' and '%(Resource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'"> - + <_Temp Remove="@(_Temp)" /> diff --git a/src/Tasks/Microsoft.Common.props b/src/Tasks/Microsoft.Common.props index be186f628bd..c58b0ec2155 100644 --- a/src/Tasks/Microsoft.Common.props +++ b/src/Tasks/Microsoft.Common.props @@ -65,7 +65,7 @@ Copyright (C) Microsoft Corporation. All rights reserved. the pre-restore files in the binary log and then NuGet won't be able to embed the generated one after restore. If some other project extension mechanism wants to import project extensions during restore, they need to explicitly set ImportProjectExtensionProps --> - false + false true <_InitialMSBuildProjectExtensionsPath Condition=" '$(ImportProjectExtensionProps)' == 'true' ">$(MSBuildProjectExtensionsPath) diff --git a/src/Tasks/Microsoft.Common.targets b/src/Tasks/Microsoft.Common.targets index b61819797bf..23c7ba6ddfd 100644 --- a/src/Tasks/Microsoft.Common.targets +++ b/src/Tasks/Microsoft.Common.targets @@ -34,7 +34,7 @@ Copyright (C) Microsoft Corporation. All rights reserved. the pre-restore files in the binary log and then NuGet won't be able to embed the generated one after restore. If some other project extension mechanism wants to import project extensions during restore, they need to explicitly set ImportProjectExtensionTargets --> - false + false true diff --git a/src/Utilities/ToolTask.cs b/src/Utilities/ToolTask.cs index c12c65aa568..7f554c3ff61 100644 --- a/src/Utilities/ToolTask.cs +++ b/src/Utilities/ToolTask.cs @@ -246,14 +246,12 @@ protected virtual Encoding StandardOutputEncoding { get { - if (ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_10)) + if (_encoding != null) { - if (_encoding != null) - { - // Keep the encoding of standard output & error consistent with the console code page. - return _encoding; - } + // Keep the encoding of standard output & error consistent with the console code page. + return _encoding; } + return EncodingUtilities.CurrentSystemOemEncoding; } } @@ -270,14 +268,12 @@ protected virtual Encoding StandardErrorEncoding { get { - if (ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_10)) + if (_encoding != null) { - if (_encoding != null) - { - // Keep the encoding of standard output & error consistent with the console code page. - return _encoding; - } + // Keep the encoding of standard output & error consistent with the console code page. + return _encoding; } + return EncodingUtilities.CurrentSystemOemEncoding; } } @@ -1558,10 +1554,7 @@ public override bool Execute() } File.AppendAllText(_temporaryBatchFile, commandLineCommands, encoding); - if (ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_10)) - { - _encoding = encoding; - } + _encoding = encoding; string batchFileForCommandLine = _temporaryBatchFile;