-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround the sanity check breaking. Revert this commit when changewave
17_0 is deleted.
- Loading branch information
Showing
6 changed files
with
62 additions
and
8 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj
This file contains 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
22 changes: 22 additions & 0 deletions
22
src/Build.OM.UnitTests/MockManagedFileSystemChangeWavesExtension.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
// This file is a workaround from PR https://github.com/dotnet/msbuild/pull/6771. | ||
// We need to avoid using ChangeWaves.cs in Microsoft.Build.Engine.OM.UnitTests. | ||
// It mocks ManagedFileSystemChangeWavesExtension.cs. | ||
// We are mocking the call ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_0) as true. | ||
// After deleting changewave 17_0 delete this file as well. | ||
|
||
#if FEATURE_MSIOREDIST | ||
namespace Microsoft.Build.Shared.FileSystem | ||
{ | ||
/// <summary> | ||
/// Implementation of file system operations directly over the dot net managed layer | ||
/// </summary> | ||
|
||
internal partial class ManagedFileSystem : IFileSystem | ||
{ | ||
private bool ShouldUseMicrosoftIO = true; | ||
} | ||
} | ||
#endif |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<Project> | ||
<Import Project="FileSystemSourcesBase.proj" /> | ||
|
||
<ItemGroup> | ||
<Compile Include="$(MSBuildThisFileDirectory)FileSystem\*.cs"> | ||
<Link>FileSystem\%(Filename).cs</Link> | ||
<Compile Include="$(MSBuildThisFileDirectory)ManagedFileSystemChangeWavesExtension.cs"> | ||
<Link>FileSystem\ManagedFileSystemChangeWavesExtension.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
</Project> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildThisFileDirectory)FileSystem\*.cs"> | ||
<Link>FileSystem\%(Filename).cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
// This file is a workaround from PR https://github.com/dotnet/msbuild/pull/6771. | ||
// We need to avoid using ChangeWaves.cs in Microsoft.Build.Engine.OM.UnitTests. | ||
// Usage of ChangeWaves class in ManagedFileSystem is done in this separate file. | ||
// In Microsoft.Build.Engine.OM.UnitTests this part is mocked (see MockManagedFileSystemChangeWavesExtension.cs). | ||
// After deleting changewave 17_0 delete this file as well. | ||
|
||
#if FEATURE_MSIOREDIST | ||
using Microsoft.Build.Utilities; | ||
|
||
namespace Microsoft.Build.Shared.FileSystem | ||
{ | ||
/// <summary> | ||
/// Implementation of file system operations directly over the dot net managed layer | ||
/// </summary> | ||
internal partial class ManagedFileSystem : IFileSystem | ||
{ | ||
private bool ShouldUseMicrosoftIO = ChangeWaves.AreFeaturesEnabled(ChangeWaves.Wave17_0); | ||
} | ||
} | ||
#endif |