From f5a6297dccb5054065928c02cdeb59217bee3d94 Mon Sep 17 00:00:00 2001 From: Oleg Shevchenko Date: Mon, 8 Jul 2024 16:21:25 +0300 Subject: [PATCH] Update SDK to 2024.1 (#105) * Update SdkVersion in Directory.Build.props The SdkVersion in Directory.Build.props has been updated from version 2023.3.2 to 2024.1.0-eap01. This update is in line with the latest SDK changes and aims to maintain compatibility. * Update SDK version and target framework The SDK version has been updated from the Early Access Preview version to the stable version. The .NET target framework version in the _build.csproj file has been updated to 8.0. Also, the versions of the Nuke.Common, dotnet-sonarscanner, NuGet.CommandLine, and NUnit.ConsoleRunner packages have been updated. Lastly, the '.gitignore' file was updated to ignore GitHub Copilot chat sessions. * Update SdkVersion to 2024.1.4 The SdkVersion in the `Directory.Build.props` file has been updated from 2024.1.0 to 2024.1.4. This version bump ensures the project uses the latest features and bug fixes from the SDK. * Update MicrosoftLoggingPackage version and add TestNet60 attribute The version of the MicrosoftLoggingPackage constant in the NugetPackages.cs file was updated from 1.0.0 to 6.0.0. Additionally, the TestNet60 attribute was added to the ContextualLoggerConstructorAnalyzerTests class in the ContextualLoggerConstructorAnalyzerTests.cs file. --- Directory.Build.props | 2 +- build/_build.csproj | 8 ++++---- .../.idea.ReSharper.Structured.Logging/.idea/.gitignore | 2 ++ .../Analyzer/ContextualLoggerConstructorAnalyzerTests.cs | 5 ++++- test/src/Constants/NugetPackages.cs | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index e0a1e54..8b169e1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 2023.3.2 + 2024.1.4 diff --git a/build/_build.csproj b/build/_build.csproj index ca98933..d34d145 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 CS0649;CS0169 .. @@ -15,9 +15,9 @@ - - - + + + diff --git a/src/.idea/.idea.ReSharper.Structured.Logging/.idea/.gitignore b/src/.idea/.idea.ReSharper.Structured.Logging/.idea/.gitignore index fe1c087..95d2a6f 100644 --- a/src/.idea/.idea.ReSharper.Structured.Logging/.idea/.gitignore +++ b/src/.idea/.idea.ReSharper.Structured.Logging/.idea/.gitignore @@ -11,3 +11,5 @@ # Datasource local storage ignored files /dataSources/ /dataSources.local.xml +# GitHub Copilot persisted chat sessions +/copilot/chatSessions diff --git a/test/src/Analyzer/ContextualLoggerConstructorAnalyzerTests.cs b/test/src/Analyzer/ContextualLoggerConstructorAnalyzerTests.cs index e146ce2..581533f 100644 --- a/test/src/Analyzer/ContextualLoggerConstructorAnalyzerTests.cs +++ b/test/src/Analyzer/ContextualLoggerConstructorAnalyzerTests.cs @@ -1,7 +1,10 @@ -using NUnit.Framework; +using JetBrains.ReSharper.TestFramework; + +using NUnit.Framework; namespace ReSharper.Structured.Logging.Tests.Analyzer { + [TestNet60] public class ContextualLoggerConstructorAnalyzerTests : MessageTemplateAnalyzerTestBase { protected override string SubPath => "ContextualLoggerConstructor"; diff --git a/test/src/Constants/NugetPackages.cs b/test/src/Constants/NugetPackages.cs index 0b66e9b..93bb3ac 100644 --- a/test/src/Constants/NugetPackages.cs +++ b/test/src/Constants/NugetPackages.cs @@ -4,7 +4,7 @@ internal static class NugetPackages { public const string SerilogNugetPackage = "Serilog/2.7.1"; - public const string MicrosoftLoggingPackage = "Microsoft.Extensions.Logging/1.0.0"; + public const string MicrosoftLoggingPackage = "Microsoft.Extensions.Logging/6.0.0"; public const string NlogLoggingPackage = "NLog/4.5.11";