diff --git a/src/Directory.Build.props b/Directory.Build.props similarity index 95% rename from src/Directory.Build.props rename to Directory.Build.props index 7d0f56f7e..aca9fbb92 100644 --- a/src/Directory.Build.props +++ b/Directory.Build.props @@ -23,6 +23,9 @@ latest true enable + + true + diff --git a/src/Directory.Packages.props b/Directory.Packages.props similarity index 100% rename from src/Directory.Packages.props rename to Directory.Packages.props diff --git a/build/Build.CI.GitHubActions.cs b/build/Build.CI.GitHubActions.cs index 1984d2c2f..f654bbc73 100644 --- a/build/Build.CI.GitHubActions.cs +++ b/build/Build.CI.GitHubActions.cs @@ -1,6 +1,6 @@ using Nuke.Common.CI.GitHubActions; -[GitHubActionsAttribute( +[GitHubActions( "pr", GitHubActionsImage.WindowsLatest, GitHubActionsImage.UbuntuLatest, @@ -11,7 +11,7 @@ InvokedTargets = new[] { nameof(Compile), nameof(Test), nameof(Pack) }, CacheKeyFiles = new[] { "global.json", "src/**/*.csproj", "src/**/package.json" }), ] -[GitHubActionsAttribute( +[GitHubActions( "build", GitHubActionsImage.WindowsLatest, GitHubActionsImage.UbuntuLatest, diff --git a/build/Build.cs b/build/Build.cs index 9bc6e74f8..06284d623 100644 --- a/build/Build.cs +++ b/build/Build.cs @@ -53,7 +53,7 @@ string DetermineVersionPrefix() } else { - var propsDocument = XDocument.Parse((SourceDirectory / "Directory.Build.props").ReadAllText()); + var propsDocument = XDocument.Parse((RootDirectory / "Directory.Build.props").ReadAllText()); versionPrefix = propsDocument.Element("Project").Element("PropertyGroup").Element("VersionPrefix").Value; Serilog.Log.Information("Version prefix {VersionPrefix} read from Directory.Build.props", versionPrefix); } @@ -128,7 +128,7 @@ protected override void OnBuildInitialized() var framework = ""; if (!IsRunningOnWindows) { - framework = "net6.0"; + framework = "net8.0"; } DotNetTest(s => s diff --git a/build/_build.csproj b/build/_build.csproj index 825416996..85acb7e2b 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,13 +2,16 @@ Exe - net6.0 + net8.0 CS0649;CS0169 .. .. 1 false + true + false + false diff --git a/global.json b/global.json new file mode 100644 index 000000000..989a69caf --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "8.0.100", + "rollForward": "latestMinor" + } +} \ No newline at end of file diff --git a/src/NJsonSchema.Benchmark/NJsonSchema.Benchmark.csproj b/src/NJsonSchema.Benchmark/NJsonSchema.Benchmark.csproj index 03c3ba1c7..1f7792c19 100644 --- a/src/NJsonSchema.Benchmark/NJsonSchema.Benchmark.csproj +++ b/src/NJsonSchema.Benchmark/NJsonSchema.Benchmark.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false $(NoWarn),xUnit1013 false diff --git a/src/NJsonSchema.CodeGeneration.CSharp.Tests/NJsonSchema.CodeGeneration.CSharp.Tests.csproj b/src/NJsonSchema.CodeGeneration.CSharp.Tests/NJsonSchema.CodeGeneration.CSharp.Tests.csproj index a346f6fac..408d7f362 100644 --- a/src/NJsonSchema.CodeGeneration.CSharp.Tests/NJsonSchema.CodeGeneration.CSharp.Tests.csproj +++ b/src/NJsonSchema.CodeGeneration.CSharp.Tests/NJsonSchema.CodeGeneration.CSharp.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false true $(NoWarn),1587,1998,1591,618,SYSLIB0012 @@ -16,8 +16,8 @@ - - + + diff --git a/src/NJsonSchema.CodeGeneration.Tests/NJsonSchema.CodeGeneration.Tests.csproj b/src/NJsonSchema.CodeGeneration.Tests/NJsonSchema.CodeGeneration.Tests.csproj index d14f06a1d..08c8252c0 100644 --- a/src/NJsonSchema.CodeGeneration.Tests/NJsonSchema.CodeGeneration.Tests.csproj +++ b/src/NJsonSchema.CodeGeneration.Tests/NJsonSchema.CodeGeneration.Tests.csproj @@ -1,7 +1,7 @@ - net6.0;net462 + net8.0;net462 false $(NoWarn),1998,1591,618 disable @@ -9,7 +9,7 @@ - + diff --git a/src/NJsonSchema.CodeGeneration.TypeScript.Tests/NJsonSchema.CodeGeneration.TypeScript.Tests.csproj b/src/NJsonSchema.CodeGeneration.TypeScript.Tests/NJsonSchema.CodeGeneration.TypeScript.Tests.csproj index 34a29162b..356f35ade 100644 --- a/src/NJsonSchema.CodeGeneration.TypeScript.Tests/NJsonSchema.CodeGeneration.TypeScript.Tests.csproj +++ b/src/NJsonSchema.CodeGeneration.TypeScript.Tests/NJsonSchema.CodeGeneration.TypeScript.Tests.csproj @@ -1,7 +1,7 @@ - net6.0;net462 + net8.0;net462 false true $(NoWarn),1587,1998,1591,618 diff --git a/src/NJsonSchema.Demo.Performance/NJsonSchema.Demo.Performance.csproj b/src/NJsonSchema.Demo.Performance/NJsonSchema.Demo.Performance.csproj index 16ad4cda8..d85c7955c 100644 --- a/src/NJsonSchema.Demo.Performance/NJsonSchema.Demo.Performance.csproj +++ b/src/NJsonSchema.Demo.Performance/NJsonSchema.Demo.Performance.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 false false diff --git a/src/NJsonSchema.Demo/NJsonSchema.Demo.csproj b/src/NJsonSchema.Demo/NJsonSchema.Demo.csproj index 76eb407fc..7ee582559 100644 --- a/src/NJsonSchema.Demo/NJsonSchema.Demo.csproj +++ b/src/NJsonSchema.Demo/NJsonSchema.Demo.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 false true diff --git a/src/NJsonSchema.NewtonsoftJson.Tests/NJsonSchema.NewtonsoftJson.Tests.csproj b/src/NJsonSchema.NewtonsoftJson.Tests/NJsonSchema.NewtonsoftJson.Tests.csproj index a16e59d21..2dc121392 100644 --- a/src/NJsonSchema.NewtonsoftJson.Tests/NJsonSchema.NewtonsoftJson.Tests.csproj +++ b/src/NJsonSchema.NewtonsoftJson.Tests/NJsonSchema.NewtonsoftJson.Tests.csproj @@ -1,7 +1,7 @@ - net6.0;net462 + net8.0;net462 false false disable diff --git a/src/NJsonSchema.Yaml.Tests/NJsonSchema.Yaml.Tests.csproj b/src/NJsonSchema.Yaml.Tests/NJsonSchema.Yaml.Tests.csproj index c7dbe8cef..1c0df7d85 100644 --- a/src/NJsonSchema.Yaml.Tests/NJsonSchema.Yaml.Tests.csproj +++ b/src/NJsonSchema.Yaml.Tests/NJsonSchema.Yaml.Tests.csproj @@ -1,7 +1,7 @@ - net6.0;net462 + net8.0;net462 false false disable diff --git a/src/NJsonSchema.sln b/src/NJsonSchema.sln index ed5db6d13..d5360e5be 100644 --- a/src/NJsonSchema.sln +++ b/src/NJsonSchema.sln @@ -31,8 +31,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NJsonSchema.Yaml.Tests", "N EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "00 Build", "00 Build", "{863B2D88-A0BD-4466-8583-AAD0B8D3F182}" ProjectSection(SolutionItems) = preProject - Directory.Build.props = Directory.Build.props - Directory.Packages.props = Directory.Packages.props + Directory.Build.props = ..\Directory.Build.props + Directory.Packages.props = ..\Directory.Packages.props ..\README.md = ..\README.md EndProjectSection EndProject @@ -245,21 +245,13 @@ Global {990EF464-C967-4E08-8C3D-0568A47B6D2A}.Release|x86.ActiveCfg = Release|Any CPU {990EF464-C967-4E08-8C3D-0568A47B6D2A}.Release|x86.Build.0 = Release|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|Any CPU.Build.0 = Debug|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|ARM.ActiveCfg = Debug|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|ARM.Build.0 = Debug|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|x64.ActiveCfg = Debug|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|x64.Build.0 = Debug|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|x86.ActiveCfg = Debug|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Debug|x86.Build.0 = Debug|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|Any CPU.Build.0 = Release|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|ARM.ActiveCfg = Release|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|ARM.Build.0 = Release|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|x64.ActiveCfg = Release|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|x64.Build.0 = Release|Any CPU {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|x86.ActiveCfg = Release|Any CPU - {8E4E5A64-B5B7-4718-A92F-CB6B08512264}.Release|x86.Build.0 = Release|Any CPU {A9C2A9CD-44F6-4A21-9D72-00CF5BE0A36F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A9C2A9CD-44F6-4A21-9D72-00CF5BE0A36F}.Debug|Any CPU.Build.0 = Debug|Any CPU {A9C2A9CD-44F6-4A21-9D72-00CF5BE0A36F}.Debug|ARM.ActiveCfg = Debug|Any CPU