From 8e44e8508cb1f0777bcae15a04d6d288f0e801fc Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 28 Dec 2025 19:11:14 +0000 Subject: [PATCH] fix: Replace obsolete SQLite package and fix LogWarning error - Replace Mono.Data.Sqlite.Portable with Microsoft.Data.Sqlite 8.0.0 - Mono.Data.Sqlite.Portable targets .NET Framework and is incompatible with .NET 8 - Microsoft.Data.Sqlite is the modern, officially supported package for .NET 8 - Resolves NU1701 package compatibility warning - Update Database.cs to use Microsoft.Data.Sqlite namespace - Remove obsolete SqliteConnection.SetConfig call (not supported in Microsoft.Data.Sqlite) - Add comment noting that Microsoft.Data.Sqlite handles thread safety internally - Add missing using statement for Microsoft.Extensions.Logging in frmMain.cs - Fixes CS1061 compilation error: ILogger.LogWarning extension method not found - LogWarning is an extension method that requires the namespace import These changes ensure compatibility with .NET 8 and resolve all build errors. --- Intersect.Editor/Core/Database.cs | 4 ++-- Intersect.Editor/Forms/frmMain.cs | 1 + Intersect.Editor/Intersect.Editor.csproj | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Intersect.Editor/Core/Database.cs b/Intersect.Editor/Core/Database.cs index d5a432d36d..bd97a49528 100644 --- a/Intersect.Editor/Core/Database.cs +++ b/Intersect.Editor/Core/Database.cs @@ -1,6 +1,6 @@ using Intersect.Configuration; using Intersect.Editor.Configuration; -using Mono.Data.Sqlite; +using Microsoft.Data.Sqlite; namespace Intersect.Editor.Core; @@ -64,7 +64,7 @@ public static void InitMapCache() Directory.CreateDirectory("resources"); } - SqliteConnection.SetConfig(SQLiteConfig.Serialized); + // Note: Microsoft.Data.Sqlite handles thread safety internally, no need to set serialized mode if (!File.Exists(DB_FILENAME)) { CreateDatabase(); diff --git a/Intersect.Editor/Forms/frmMain.cs b/Intersect.Editor/Forms/frmMain.cs index 7bd671cf1d..3e2c92a1ee 100644 --- a/Intersect.Editor/Forms/frmMain.cs +++ b/Intersect.Editor/Forms/frmMain.cs @@ -21,6 +21,7 @@ using Intersect.Localization; using Intersect.Network; using Intersect.Utilities; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using WeifenLuo.WinFormsUI.Docking; diff --git a/Intersect.Editor/Intersect.Editor.csproj b/Intersect.Editor/Intersect.Editor.csproj index 03197b3fd1..ab120f9253 100644 --- a/Intersect.Editor/Intersect.Editor.csproj +++ b/Intersect.Editor/Intersect.Editor.csproj @@ -70,7 +70,7 @@ - +