From 48e76512910ef4671bdf50276d1bdbfcd4279367 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Fri, 8 Dec 2023 23:30:46 -0700 Subject: [PATCH] Target .NET 8 --- DotnetCliVersion.txt | 2 +- build/Build.cs | 8 ++++---- build/CodeGen/_buildCodeGen.csproj | 2 +- build/_build.csproj | 9 +++++---- src/LibHac/LibHac.csproj | 6 +----- src/hactoolnet/hactoolnet.csproj | 6 +++--- tests/LibHac.Tests/Fs/PathFormatterTests.cs | 14 +++++++------- tests/LibHac.Tests/LibHac.Tests.csproj | 12 ++++++------ 8 files changed, 28 insertions(+), 31 deletions(-) diff --git a/DotnetCliVersion.txt b/DotnetCliVersion.txt index 33300325..d3f1dda8 100644 --- a/DotnetCliVersion.txt +++ b/DotnetCliVersion.txt @@ -1 +1 @@ -7.0.402 \ No newline at end of file +8.0.100 \ No newline at end of file diff --git a/build/Build.cs b/build/Build.cs index e51f35e0..a6c4b4ff 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -43,7 +43,7 @@ partial class Build : NukeBuild AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts"; AbsolutePath SignedArtifactsDirectory => ArtifactsDirectory / "signed"; AbsolutePath TempDirectory => RootDirectory / ".nuke" / "temp"; - AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_net7.0"; + AbsolutePath CliCoreDir => TempDirectory / "hactoolnet_net8.0"; AbsolutePath CliNativeDir => TempDirectory / $"hactoolnet_{HostOsName}"; AbsolutePath CliNativeExe => CliNativeDir / $"hactoolnet{NativeProgramExtension}"; AbsolutePath CliCoreZip => ArtifactsDirectory / $"hactoolnet-{VersionString}-netcore.zip"; @@ -226,7 +226,7 @@ partial class Build : NukeBuild DotNetPublish(s => publishSettings .SetProject(HactoolnetProject) - .SetFramework("net7.0") + .SetFramework("net8.0") .SetOutput(CliCoreDir) .SetNoBuild(true) .SetProperties(VersionProps)); @@ -276,7 +276,7 @@ partial class Build : NukeBuild .EnableNoBuild() .SetConfiguration(Configuration); - if (EnvironmentInfo.IsUnix) settings = settings.SetProperty("TargetFramework", "net7.0"); + if (EnvironmentInfo.IsUnix) settings = settings.SetProperty("TargetFramework", "net8.0"); DotNetTest(s => settings); }); @@ -593,7 +593,7 @@ partial class Build : NukeBuild SignAssemblies(password, toSign.Select(x => x.ToString()).ToArray()); // Avoid having multiple signed versions of the same file - File.Copy(nupkgDir / "lib" / "net7.0" / "LibHac.dll", coreFxDir / "LibHac.dll", true); + File.Copy(nupkgDir / "lib" / "net8.0" / "LibHac.dll", coreFxDir / "LibHac.dll", true); ZipDirectory(SignedArtifactsDirectory / Path.GetFileName(nupkgFile), nupkgDir, pkgFileList, CommitTime); ZipDirectory(SignedArtifactsDirectory / Path.GetFileName(CliCoreZip), coreFxDir, CommitTime); diff --git a/build/CodeGen/_buildCodeGen.csproj b/build/CodeGen/_buildCodeGen.csproj index 4f94a2ea..0d9adaaa 100644 --- a/build/CodeGen/_buildCodeGen.csproj +++ b/build/CodeGen/_buildCodeGen.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 false LibHacBuild.CodeGen False diff --git a/build/_build.csproj b/build/_build.csproj index c3d72d46..c49e0810 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,20 +2,21 @@ Exe - net7.0 + net8.0 false LibHacBuild False CS0649;CS0169 - .. - .. + .. + .. 1 + true - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/LibHac/LibHac.csproj b/src/LibHac/LibHac.csproj index 726b033c..6d5c539b 100644 --- a/src/LibHac/LibHac.csproj +++ b/src/LibHac/LibHac.csproj @@ -3,7 +3,7 @@ Library 0.19.0 - net7.0 + net8.0 true @@ -37,10 +37,6 @@ - - - - <_Parameter1>LibHac.Tests diff --git a/src/hactoolnet/hactoolnet.csproj b/src/hactoolnet/hactoolnet.csproj index aa2e3102..1019045e 100644 --- a/src/hactoolnet/hactoolnet.csproj +++ b/src/hactoolnet/hactoolnet.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 @@ -24,8 +24,8 @@ - true - NATIVEAOT;$(DefineConstants) + true + NATIVEAOT;$(DefineConstants) diff --git a/tests/LibHac.Tests/Fs/PathFormatterTests.cs b/tests/LibHac.Tests/Fs/PathFormatterTests.cs index c5d0201c..4e48ed56 100644 --- a/tests/LibHac.Tests/Fs/PathFormatterTests.cs +++ b/tests/LibHac.Tests/Fs/PathFormatterTests.cs @@ -215,7 +215,7 @@ public class PathFormatterTests Assert.Equal(expectedNormalized, StringUtils.Utf8ZToString(buffer)); } - public static TheoryData TestData_IsNormalized_EmptyPath => new() + public static TheoryData TestData_IsNormalized_EmptyPath => new() { { @"", "", false, 0, ResultFs.InvalidPathFormat.Value }, { @"", "E", true, 0, Result.Success }, @@ -229,7 +229,7 @@ public class PathFormatterTests IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult); } - public static TheoryData TestData_IsNormalized_MountName => new() + public static TheoryData TestData_IsNormalized_MountName => new() { { @"mount:/aa/bb", "", false, 0, ResultFs.InvalidPathFormat.Value }, { @"mount:/aa/bb", "W", false, 0, ResultFs.InvalidPathFormat.Value }, @@ -251,7 +251,7 @@ public class PathFormatterTests IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult); } - public static TheoryData TestData_IsNormalized_WindowsPath => new() + public static TheoryData TestData_IsNormalized_WindowsPath => new() { { @"c:/aa/bb", "", false, 0, ResultFs.InvalidPathFormat.Value }, { @"c:\aa\bb", "", false, 0, ResultFs.InvalidPathFormat.Value }, @@ -298,7 +298,7 @@ public class PathFormatterTests IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult); } - public static TheoryData TestData_IsNormalized_RelativePath => new() + public static TheoryData TestData_IsNormalized_RelativePath => new() { { @"./aa/bb", "", false, 0, ResultFs.InvalidPathFormat.Value }, { @"./aa/bb/../cc", "R", false, 1, Result.Success }, @@ -318,7 +318,7 @@ public class PathFormatterTests IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult); } - public static TheoryData TestData_IsNormalized_Backslash => new() + public static TheoryData TestData_IsNormalized_Backslash => new() { { @"\aa\bb\..\cc", "", false, 0, ResultFs.InvalidPathFormat.Value }, { @"\aa\bb\..\cc", "B", false, 0, ResultFs.InvalidPathFormat.Value }, @@ -339,7 +339,7 @@ public class PathFormatterTests IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult); } - public static TheoryData TestData_IsNormalized_AllowAllChars => new() + public static TheoryData TestData_IsNormalized_AllowAllChars => new() { { @"/aa/b:b/cc", "", false, 0, ResultFs.InvalidCharacter.Value }, { @"/aa/b*b/cc", "", false, 0, ResultFs.InvalidCharacter.Value }, @@ -372,7 +372,7 @@ public class PathFormatterTests IsNormalizedImpl(path, pathFlags, expectedIsNormalized, expectedLength, expectedResult); } - public static TheoryData TestData_IsNormalized_All => new() + public static TheoryData TestData_IsNormalized_All => new() { { @"mount:./aa/bb", "WRM", true, 13, Result.Success }, { @"mount:./aa/bb\cc/dd", "WRM", false, 0, Result.Success }, diff --git a/tests/LibHac.Tests/LibHac.Tests.csproj b/tests/LibHac.Tests/LibHac.Tests.csproj index 71b43fae..6bcad87a 100644 --- a/tests/LibHac.Tests/LibHac.Tests.csproj +++ b/tests/LibHac.Tests/LibHac.Tests.csproj @@ -1,7 +1,7 @@  - net7.0 + net8.0 true true @@ -9,11 +9,11 @@ - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive