From f1513898ca78fd63e32ebebc6b67020b2c9d0871 Mon Sep 17 00:00:00 2001
From: stan-sz <37585349+stan-sz@users.noreply.github.com>
Date: Mon, 23 Sep 2024 18:08:02 +0200
Subject: [PATCH 1/6] Use CopyOnWrite 0.3.9
Consume the fix published in https://github.com/microsoft/CopyOnWrite/pull/45/files
Signed-off-by: stan-sz <37585349+stan-sz@users.noreply.github.com>
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index dbff5b2..ed83b6e 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,7 +7,7 @@
17.8.3
-
+
From 0a3440bf6005ee854702bfddd0b59219abd365ce Mon Sep 17 00:00:00 2001
From: stan-sz <37585349+stan-sz@users.noreply.github.com>
Date: Mon, 23 Sep 2024 19:51:34 +0200
Subject: [PATCH 2/6] Update Directory.Packages.props
---
Directory.Packages.props | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index ed83b6e..56e28c5 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,7 +7,7 @@
17.8.3
-
+
From 8a621214dcfc583be257e8b0a2aea76c6b324bc0 Mon Sep 17 00:00:00 2001
From: stan-sz <37585349+stan-sz@users.noreply.github.com>
Date: Tue, 24 Sep 2024 10:03:24 +0200
Subject: [PATCH 3/6] Fix the tests
---
Directory.Packages.props | 3 ++-
src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs | 7 -------
.../Microsoft.Build.CopyOnWrite.UnitTests.csproj | 5 +++--
3 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 56e28c5..3cf35d8 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -8,12 +8,13 @@
-
+
+
diff --git a/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs b/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs
index 09ab8e4..290a5d7 100644
--- a/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs
+++ b/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs
@@ -13,11 +13,6 @@
namespace Microsoft.Build.CopyOnWrite.UnitTests;
-// These tests rely on Microsoft.Build.Framework which has only a net472 and current-framework target.
-// Don't compile these tests for .NET versions in between as Microsoft.Build.Framework.dll will not be
-// propagated to the output dir.
-#if !NET6_0 && !NET7_0
-
public class CopyUpToDateTests : MSBuildSdkTestBase
{
// If the developer has specified this environment variable (also used in the base CoW library unit tests),
@@ -127,5 +122,3 @@ Copy CreateFreshCopyTask()
}
}
}
-
-#endif
diff --git a/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj b/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj
index 845450c..a6606e9 100644
--- a/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj
+++ b/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj
@@ -1,11 +1,11 @@
- net472;net6.0;net7.0;net8.0
+ net472;net8.0
Enable
-
+
@@ -13,6 +13,7 @@
+
From 14eacd940863da96f588310ebf9b9d885db07a3c Mon Sep 17 00:00:00 2001
From: stan-sz <37585349+stan-sz@users.noreply.github.com>
Date: Tue, 24 Sep 2024 10:14:54 +0200
Subject: [PATCH 4/6] Fix
---
src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs | 7 +++++++
.../Microsoft.Build.CopyOnWrite.UnitTests.csproj | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs b/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs
index 290a5d7..09ab8e4 100644
--- a/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs
+++ b/src/CopyOnWrite.UnitTests/CopyUpToDateTests.cs
@@ -13,6 +13,11 @@
namespace Microsoft.Build.CopyOnWrite.UnitTests;
+// These tests rely on Microsoft.Build.Framework which has only a net472 and current-framework target.
+// Don't compile these tests for .NET versions in between as Microsoft.Build.Framework.dll will not be
+// propagated to the output dir.
+#if !NET6_0 && !NET7_0
+
public class CopyUpToDateTests : MSBuildSdkTestBase
{
// If the developer has specified this environment variable (also used in the base CoW library unit tests),
@@ -122,3 +127,5 @@ Copy CreateFreshCopyTask()
}
}
}
+
+#endif
diff --git a/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj b/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj
index a6606e9..9145560 100644
--- a/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj
+++ b/src/CopyOnWrite.UnitTests/Microsoft.Build.CopyOnWrite.UnitTests.csproj
@@ -1,11 +1,11 @@
- net472;net8.0
+ net472;net6.0;net7.0;net8.0
Enable
-
+
@@ -13,7 +13,7 @@
-
+
From 51f49d1d4a072c59549d9c51dc5eb603989501b8 Mon Sep 17 00:00:00 2001
From: stan-sz <37585349+stan-sz@users.noreply.github.com>
Date: Tue, 24 Sep 2024 10:35:08 +0200
Subject: [PATCH 5/6] Skip failing tests
---
src/NoTargets.UnitTests/NoTargetsTests.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/NoTargets.UnitTests/NoTargetsTests.cs b/src/NoTargets.UnitTests/NoTargetsTests.cs
index f17405f..f166e58 100644
--- a/src/NoTargets.UnitTests/NoTargetsTests.cs
+++ b/src/NoTargets.UnitTests/NoTargetsTests.cs
@@ -269,7 +269,11 @@ public void SimpleBuild(string projectExtension)
}
[Theory]
- [InlineData(".csproj")]
+ [InlineData(".csproj"
+#if NETFRAMEWORK
+ , Skip = "Currently broken"
+#endif
+ )]
[InlineData(".proj", Skip = "Currently broken because of a regression in Static Graph when the extension is .proj")]
public void StaticGraphBuildsSucceed(string projectExtension)
{
From b5da9d9e57c0d63f0b0ff0e4be862cdf14b0a6fe Mon Sep 17 00:00:00 2001
From: stan-sz <37585349+stan-sz@users.noreply.github.com>
Date: Tue, 24 Sep 2024 11:33:02 +0200
Subject: [PATCH 6/6] Skip failing test
---
src/NoTargets.UnitTests/NoTargetsTests.cs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/NoTargets.UnitTests/NoTargetsTests.cs b/src/NoTargets.UnitTests/NoTargetsTests.cs
index f166e58..8916de1 100644
--- a/src/NoTargets.UnitTests/NoTargetsTests.cs
+++ b/src/NoTargets.UnitTests/NoTargetsTests.cs
@@ -269,11 +269,9 @@ public void SimpleBuild(string projectExtension)
}
[Theory]
- [InlineData(".csproj"
-#if NETFRAMEWORK
- , Skip = "Currently broken"
+#if !NETFRAMEWORK
+ [InlineData(".csproj")]
#endif
- )]
[InlineData(".proj", Skip = "Currently broken because of a regression in Static Graph when the extension is .proj")]
public void StaticGraphBuildsSucceed(string projectExtension)
{