From c9bd18e7803ee61f7627ccad63ba6ae3a94e9980 Mon Sep 17 00:00:00 2001 From: HLCaptain Date: Tue, 25 Jan 2022 20:22:58 +0100 Subject: [PATCH] Extension now supports all VS19 versions, updated dependencies (#23) * Dependencies updated to support VS22. * Close throws exception if not running on main thread. Roslyn dependency set. * Updated Visual Studio version to 2022 in README.md * Updated dependencies. May break previous VS19 builds. Works on VS22 17.0.4. * Changed dependencies back to work only with VS19, but not only with Community, but with Pro and Enterprise versions as well. Backwards compatibility is not achievable when using VS22 dependencies. * Upgraded dependencies. Installs only for VS19 * Requirements updated in README.md * Revert commit 35f18ad. Changed back Test project dependencies. * Removed duplication. * Downgraded dependencies. --- GodotAddinVS/GodotAddinVS.csproj | 6 +++--- GodotAddinVS/GodotMessaging/MessageHandler.cs | 2 +- GodotAddinVS/GodotSolutionEventsListener.cs | 1 + GodotAddinVS/source.extension.vsixmanifest | 8 +++++--- README.md | 1 + 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/GodotAddinVS/GodotAddinVS.csproj b/GodotAddinVS/GodotAddinVS.csproj index 6ccce17..5db954d 100644 --- a/GodotAddinVS/GodotAddinVS.csproj +++ b/GodotAddinVS/GodotAddinVS.csproj @@ -78,10 +78,10 @@ - + compile; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive all @@ -119,4 +119,4 @@ - + \ No newline at end of file diff --git a/GodotAddinVS/GodotMessaging/MessageHandler.cs b/GodotAddinVS/GodotMessaging/MessageHandler.cs index 5b7e117..b549e41 100644 --- a/GodotAddinVS/GodotMessaging/MessageHandler.cs +++ b/GodotAddinVS/GodotMessaging/MessageHandler.cs @@ -44,7 +44,7 @@ namespace GodotAddinVS.GodotMessaging var mainWindow = dte.MainWindow; mainWindow.Activate(); - SetForegroundWindow(new IntPtr(mainWindow.HWnd)); + SetForegroundWindow((IntPtr)mainWindow.HWnd); return new OpenFileResponse {Status = MessageStatus.Ok}; } diff --git a/GodotAddinVS/GodotSolutionEventsListener.cs b/GodotAddinVS/GodotSolutionEventsListener.cs index 28a1a8d..0d0be66 100644 --- a/GodotAddinVS/GodotSolutionEventsListener.cs +++ b/GodotAddinVS/GodotSolutionEventsListener.cs @@ -148,6 +148,7 @@ namespace GodotAddinVS private void Close() { + ThreadHelper.ThrowIfNotOnUIThread(); if (GodotMessagingClient != null) { ServiceContainer.RemoveService(typeof(Client)); diff --git a/GodotAddinVS/source.extension.vsixmanifest b/GodotAddinVS/source.extension.vsixmanifest index fae292c..6d28fa5 100644 --- a/GodotAddinVS/source.extension.vsixmanifest +++ b/GodotAddinVS/source.extension.vsixmanifest @@ -1,7 +1,7 @@ - + Godot Support Support for Godot Engine C# projects, including debugging and extended code completion. LICENSE.txt @@ -9,7 +9,9 @@ Godot - + + + @@ -30,6 +32,6 @@ As such, this extension sadly requires Xamarin to be installed as well for now. It's a quite bulky dependency, so we should continue looking for possible alternatives to this. --> - + diff --git a/README.md b/README.md index 3497a3b..a4a9c3b 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Visual Studio extension for the Godot game engine C# projects. - **Godot 3.2.3** or greater. Older versions of Godot are not supported and do not work. - **Visual Studio 2019**. VS 2017 or earlier are not supported. +- **Visit 2.x** branch to get the **Visual Studio 2022** supported version. ## Features