From 90157a3799acc06ba094b9c445e50f459f3fd194 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 15 Oct 2025 23:06:59 -0700 Subject: Update to .NET 8 to fix build .NET 6 was deprecated so move to .NET 8 and possibly .NET 10 after it releases. --- .../SetBuildNumber/Directory.Packages.props.pp | 54 ++++++++++------------ src/internal/SetBuildNumber/global.json.pp | 4 +- .../MsbuildRunnerResult.cs | 2 +- .../WixInternal.MSTestSupport/WixAssert.cs | 2 +- .../WixInternal.MSTestSupport.csproj | 2 +- .../build/WixInternal.TestSupport.Native.props | 4 +- .../build/WixInternal.TestSupport.Native.targets | 18 ++++---- .../WixInternal.TestSupport.Native/packages.config | 12 ++--- 8 files changed, 46 insertions(+), 52 deletions(-) (limited to 'src/internal') diff --git a/src/internal/SetBuildNumber/Directory.Packages.props.pp b/src/internal/SetBuildNumber/Directory.Packages.props.pp index 4632272f..6c01a4da 100644 --- a/src/internal/SetBuildNumber/Directory.Packages.props.pp +++ b/src/internal/SetBuildNumber/Directory.Packages.props.pp @@ -52,58 +52,52 @@ - - - - - + + + + + - + - - - + + + - - + + - - - + + + - - - - - - + + - - - - + + + + - + - - - + + + diff --git a/src/internal/SetBuildNumber/global.json.pp b/src/internal/SetBuildNumber/global.json.pp index 48f4ecb3..97f7e471 100644 --- a/src/internal/SetBuildNumber/global.json.pp +++ b/src/internal/SetBuildNumber/global.json.pp @@ -1,8 +1,8 @@ { "msbuild-sdks": { - "MSTest.Sdk": "3.8.3", + "MSTest.Sdk": "4.0.1", "Microsoft.Build.Traversal": "4.1.82", - "Microsoft.Build.NoTargets": "3.5.6", + "Microsoft.Build.NoTargets": "3.7.134", "WixToolset.Sdk": "{packageversion}" }, "sdk": { diff --git a/src/internal/WixInternal.MSTestSupport/MsbuildRunnerResult.cs b/src/internal/WixInternal.MSTestSupport/MsbuildRunnerResult.cs index 02e25ebb..4dda6b23 100644 --- a/src/internal/WixInternal.MSTestSupport/MsbuildRunnerResult.cs +++ b/src/internal/WixInternal.MSTestSupport/MsbuildRunnerResult.cs @@ -13,7 +13,7 @@ namespace WixInternal.MSTestSupport public void AssertSuccess() { - Assert.IsTrue(0 == this.ExitCode, $"MSBuild failed unexpectedly. Output:{Environment.NewLine}{String.Join(Environment.NewLine, this.Output)}"); + Assert.AreEqual(0, this.ExitCode, $"MSBuild failed unexpectedly. Output:{Environment.NewLine}{String.Join(Environment.NewLine, this.Output)}"); } } } diff --git a/src/internal/WixInternal.MSTestSupport/WixAssert.cs b/src/internal/WixInternal.MSTestSupport/WixAssert.cs index 9110309d..3da4f9e6 100644 --- a/src/internal/WixInternal.MSTestSupport/WixAssert.cs +++ b/src/internal/WixInternal.MSTestSupport/WixAssert.cs @@ -99,7 +99,7 @@ namespace WixInternal.MSTestSupport public static void NotEmpty(IEnumerable collection) { - Assert.IsTrue(collection.Count() > 0); + Assert.IsGreaterThan(0, collection.Count()); } public static void Empty(IEnumerable collection) diff --git a/src/internal/WixInternal.MSTestSupport/WixInternal.MSTestSupport.csproj b/src/internal/WixInternal.MSTestSupport/WixInternal.MSTestSupport.csproj index b48aacd4..6edc92c3 100644 --- a/src/internal/WixInternal.MSTestSupport/WixInternal.MSTestSupport.csproj +++ b/src/internal/WixInternal.MSTestSupport/WixInternal.MSTestSupport.csproj @@ -4,7 +4,7 @@ - net6.0;net472 + net8.0 true embedded true diff --git a/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.props b/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.props index 2362a8de..f0d37a71 100644 --- a/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.props +++ b/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.props @@ -5,8 +5,8 @@ $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), .gitignore)) - - + + v4.7.2 diff --git a/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.targets b/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.targets index a882ad8d..36875a6e 100644 --- a/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.targets +++ b/src/internal/WixInternal.TestSupport.Native/build/WixInternal.TestSupport.Native.targets @@ -22,28 +22,28 @@ $(RootPackagesFolder)xunit.abstractions.2.0.3\lib\netstandard2.0\xunit.abstractions.dll - $(RootPackagesFolder)xunit.assert.2.8.1\lib\netstandard1.1\xunit.assert.dll + $(RootPackagesFolder)xunit.assert.2.9.3\lib\netstandard1.1\xunit.assert.dll - $(RootPackagesFolder)xunit.extensibility.core.2.8.1\lib\netstandard1.1\xunit.core.dll + $(RootPackagesFolder)xunit.extensibility.core.2.9.3\lib\netstandard1.1\xunit.core.dll - $(RootPackagesFolder)xunit.extensibility.execution.2.8.1\lib\net452\xunit.execution.desktop.dll + $(RootPackagesFolder)xunit.extensibility.execution.2.9.3\lib\net452\xunit.execution.desktop.dll - + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - + + + - - + + diff --git a/src/internal/WixInternal.TestSupport.Native/packages.config b/src/internal/WixInternal.TestSupport.Native/packages.config index 21567bf3..ea16d09d 100644 --- a/src/internal/WixInternal.TestSupport.Native/packages.config +++ b/src/internal/WixInternal.TestSupport.Native/packages.config @@ -7,10 +7,10 @@ when any of these versions are updated. --> - - - - - - + + + + + + -- cgit v1.2.3-55-g6feb