From 89000477d403a5c9c3c24896d2b25d749f7c41f2 Mon Sep 17 00:00:00 2001 From: Christian Moyzyczyk Date: Thu, 16 Jan 2025 19:20:19 +0100 Subject: [PATCH] Fix compile issues and PackageReferences in NET8 branch --- OSMMapGenerator/OSMMapGenerator.cs | 2 +- TeslaLogger/DBHelper.cs | 2 -- TeslaLogger/TeslaLoggerNET8.csproj | 4 ++-- TeslaLogger/WebServer.cs | 2 +- UnitTestsTeslalogger/UnitTestDB.cs | 2 +- UnitTestsTeslalogger/UnitTestsTeslaloggerNET8.csproj | 2 ++ srtm/src/SRTM/SRTMNET8.csproj | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/OSMMapGenerator/OSMMapGenerator.cs b/OSMMapGenerator/OSMMapGenerator.cs index 2baf34afc..ad33ded09 100644 --- a/OSMMapGenerator/OSMMapGenerator.cs +++ b/OSMMapGenerator/OSMMapGenerator.cs @@ -739,7 +739,7 @@ private static SKBitmap DownloadTile(int zoom, int tile_x, int tile_y) if (debug) Console.WriteLine("Download:" + url); try { - using (WebClient wc = new WebClient()) + using (var wc = new WebClient()) { wc.Headers["User-Agent"] = "TeslaLogger.OSMMapGenerator"; wc.DownloadFile(url, localMapCacheFilePath); diff --git a/TeslaLogger/DBHelper.cs b/TeslaLogger/DBHelper.cs index 65aebad81..325596227 100644 --- a/TeslaLogger/DBHelper.cs +++ b/TeslaLogger/DBHelper.cs @@ -7402,8 +7402,6 @@ from pos return cmd.LastInsertedId; } } - - return 0; } } } diff --git a/TeslaLogger/TeslaLoggerNET8.csproj b/TeslaLogger/TeslaLoggerNET8.csproj index f39ea5d3e..aa2bb0c98 100644 --- a/TeslaLogger/TeslaLoggerNET8.csproj +++ b/TeslaLogger/TeslaLoggerNET8.csproj @@ -111,14 +111,14 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TeslaLogger/WebServer.cs b/TeslaLogger/WebServer.cs index 076418eb6..a92c2b746 100644 --- a/TeslaLogger/WebServer.cs +++ b/TeslaLogger/WebServer.cs @@ -386,7 +386,7 @@ private void OnContext(object o) Dev_DumpJSON(response, true); break; case bool _ when request.Url.LocalPath.Equals("/dev/dumpJSON/off", System.StringComparison.Ordinal): - Dev_DumpJSON(response, false); + Dev_DumpJSON(response, false); break; case bool _ when request.Url.LocalPath.Equals("/dev/verbose/on", System.StringComparison.Ordinal): Program.VERBOSE = true; diff --git a/UnitTestsTeslalogger/UnitTestDB.cs b/UnitTestsTeslalogger/UnitTestDB.cs index aa2531d30..515dfa778 100644 --- a/UnitTestsTeslalogger/UnitTestDB.cs +++ b/UnitTestsTeslalogger/UnitTestDB.cs @@ -21,7 +21,7 @@ public static void ClassInit(TestContext context) UpdateTeslalogger.Start(); - while (UpdateTeslalogger.Done == false) + while (UpdateTeslalogger.done.IsCancellationRequested == false) { System.Threading.Thread.Sleep(100); } diff --git a/UnitTestsTeslalogger/UnitTestsTeslaloggerNET8.csproj b/UnitTestsTeslalogger/UnitTestsTeslaloggerNET8.csproj index a56e73dbe..6846e516c 100644 --- a/UnitTestsTeslalogger/UnitTestsTeslaloggerNET8.csproj +++ b/UnitTestsTeslalogger/UnitTestsTeslaloggerNET8.csproj @@ -35,6 +35,8 @@ + + diff --git a/srtm/src/SRTM/SRTMNET8.csproj b/srtm/src/SRTM/SRTMNET8.csproj index 5088210b4..83723db43 100644 --- a/srtm/src/SRTM/SRTMNET8.csproj +++ b/srtm/src/SRTM/SRTMNET8.csproj @@ -28,6 +28,6 @@ - + \ No newline at end of file