From 3af4ba441237880e535c44aac0a054a954363325 Mon Sep 17 00:00:00 2001 From: Dave Walker Date: Tue, 11 Apr 2023 13:15:40 +0100 Subject: [PATCH 1/3] Target .NET 6.0 ; Update NuGet references --- .../TelloCommander.Tests.csproj | 14 +++++++------- .../CommandDictionaries/CommandDictionary.cs | 2 +- src/TelloCommander/Commander/DroneCommander.cs | 2 +- src/TelloCommander/TelloCommander.csproj | 8 ++++---- src/TelloSimulator/TelloSimulator.csproj | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/TelloCommander.Tests/TelloCommander.Tests.csproj b/src/TelloCommander.Tests/TelloCommander.Tests.csproj index 2721216..b8b797c 100644 --- a/src/TelloCommander.Tests/TelloCommander.Tests.csproj +++ b/src/TelloCommander.Tests/TelloCommander.Tests.csproj @@ -1,20 +1,20 @@ - net5.0 + net6.0 false - 1.0.0.5 + 1.0.0.6 - - - - runtime; build; native; contentfiles; analyzers; buildtransitive + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/TelloCommander/CommandDictionaries/CommandDictionary.cs b/src/TelloCommander/CommandDictionaries/CommandDictionary.cs index 678b476..f8beaad 100644 --- a/src/TelloCommander/CommandDictionaries/CommandDictionary.cs +++ b/src/TelloCommander/CommandDictionaries/CommandDictionary.cs @@ -204,7 +204,7 @@ private static string GetVersionFromFilename(string filename) /// private static string GetAssemblyLocation() { - string codeBase = Assembly.GetExecutingAssembly().CodeBase; + string codeBase = Assembly.GetExecutingAssembly().Location; UriBuilder builder = new UriBuilder(codeBase); string location = Path.GetDirectoryName(Uri.UnescapeDataString(builder.Path)); return location; diff --git a/src/TelloCommander/Commander/DroneCommander.cs b/src/TelloCommander/Commander/DroneCommander.cs index 53197aa..d965ac4 100644 --- a/src/TelloCommander/Commander/DroneCommander.cs +++ b/src/TelloCommander/Commander/DroneCommander.cs @@ -262,7 +262,7 @@ private string GetFullScriptPath(string file) if (_scriptPaths.Count == 0) { // Get the folder containing the current assembly - string codeBase = Assembly.GetExecutingAssembly().CodeBase; + string codeBase = Assembly.GetExecutingAssembly().Location; UriBuilder builder = new UriBuilder(codeBase); string folder = Path.GetDirectoryName(Uri.UnescapeDataString(builder.Path)); diff --git a/src/TelloCommander/TelloCommander.csproj b/src/TelloCommander/TelloCommander.csproj index 7bb8162..57b14a1 100644 --- a/src/TelloCommander/TelloCommander.csproj +++ b/src/TelloCommander/TelloCommander.csproj @@ -1,12 +1,12 @@ - netstandard2.1 + net6.0 TelloCommander - 1.0.0.6 - 1.0.0.6 + 1.0.0.7 + 1.0.0.7 Dave Walker - Copyright (c) 2020, 2021 Dave Walker + Copyright (c) 2020, 2021, 2023 Dave Walker Dave Walker https://github.com/davewalker5/TelloCommander Dependency updates diff --git a/src/TelloSimulator/TelloSimulator.csproj b/src/TelloSimulator/TelloSimulator.csproj index fdf2873..c646222 100644 --- a/src/TelloSimulator/TelloSimulator.csproj +++ b/src/TelloSimulator/TelloSimulator.csproj @@ -1,9 +1,9 @@ - + Exe - net5.0 - 1.0.0.5 + net6.0 + 1.0.0.7 From b14473bb97582b3969e53e181cf872c9024eded2 Mon Sep 17 00:00:00 2001 From: Dave Walker <56451830+davewalker5@users.noreply.github.com> Date: Tue, 11 Apr 2023 13:17:44 +0100 Subject: [PATCH 2/3] Update dotnetcore.yml --- .github/workflows/dotnetcore.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 853c0e7..a674a2e 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -12,7 +12,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.100 + dotnet-version: 6.0.310 - name: Build run: dotnet build --configuration Release src/TelloCommander.sln - name: Run unit tests and generate code coverage From 8de5cb4d18e34fb538c8195d0476af035a27ee8d Mon Sep 17 00:00:00 2001 From: Dave Walker Date: Tue, 11 Apr 2023 13:40:13 +0100 Subject: [PATCH 3/3] Fixup the mechanism used to determine current assembly folder --- src/TelloCommander/CommandDictionaries/CommandDictionary.cs | 3 +-- src/TelloCommander/Commander/DroneCommander.cs | 3 +-- src/TelloCommander/TelloCommander.csproj | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/TelloCommander/CommandDictionaries/CommandDictionary.cs b/src/TelloCommander/CommandDictionaries/CommandDictionary.cs index f8beaad..7587eea 100644 --- a/src/TelloCommander/CommandDictionaries/CommandDictionary.cs +++ b/src/TelloCommander/CommandDictionaries/CommandDictionary.cs @@ -205,8 +205,7 @@ private static string GetVersionFromFilename(string filename) private static string GetAssemblyLocation() { string codeBase = Assembly.GetExecutingAssembly().Location; - UriBuilder builder = new UriBuilder(codeBase); - string location = Path.GetDirectoryName(Uri.UnescapeDataString(builder.Path)); + string location = Path.GetDirectoryName(codeBase); return location; } diff --git a/src/TelloCommander/Commander/DroneCommander.cs b/src/TelloCommander/Commander/DroneCommander.cs index d965ac4..fe5ebaf 100644 --- a/src/TelloCommander/Commander/DroneCommander.cs +++ b/src/TelloCommander/Commander/DroneCommander.cs @@ -263,8 +263,7 @@ private string GetFullScriptPath(string file) { // Get the folder containing the current assembly string codeBase = Assembly.GetExecutingAssembly().Location; - UriBuilder builder = new UriBuilder(codeBase); - string folder = Path.GetDirectoryName(Uri.UnescapeDataString(builder.Path)); + string folder = Path.GetDirectoryName(codeBase); // Combine with the specified file to give the full path fullPath = Path.Combine(folder, file); diff --git a/src/TelloCommander/TelloCommander.csproj b/src/TelloCommander/TelloCommander.csproj index 57b14a1..8463851 100644 --- a/src/TelloCommander/TelloCommander.csproj +++ b/src/TelloCommander/TelloCommander.csproj @@ -3,8 +3,8 @@ net6.0 TelloCommander - 1.0.0.7 - 1.0.0.7 + 1.0.0.8 + 1.0.0.8 Dave Walker Copyright (c) 2020, 2021, 2023 Dave Walker Dave Walker