From 2eb0a05145bb28f6da5f20b3310d9384b8b6b940 Mon Sep 17 00:00:00 2001 From: HLCaptain Date: Tue, 25 Jan 2022 20:07:03 +0100 Subject: [PATCH] Updated dependencies and added VS22 compatibility (#22) * 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. * Updated dependencies, working properly with VS22, NOT WORKING WITH VS19, VISIT 1.X BRANCH TO WORK WITH VS19. * Requirements updated in README.md * Version updated to 2.0.0 * Reverted commit 35f18ad. Changed back Test project dependencies. --- GodotAddinVS/GodotAddinVS.csproj | 6 ++--- GodotAddinVS/GodotMessaging/MessageHandler.cs | 2 +- GodotAddinVS/GodotSolutionEventsListener.cs | 1 + GodotAddinVS/source.extension.vsixmanifest | 23 ++++++++++++++++--- README.md | 3 ++- 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/GodotAddinVS/GodotAddinVS.csproj b/GodotAddinVS/GodotAddinVS.csproj index 6ccce17..cb3223c 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..535d1c4 100644 --- a/GodotAddinVS/GodotMessaging/MessageHandler.cs +++ b/GodotAddinVS/GodotMessaging/MessageHandler.cs @@ -44,7 +44,7 @@ protected override async Task HandleOpenFile(OpenFileRequest request) var mainWindow = dte.MainWindow; mainWindow.Activate(); - SetForegroundWindow(new IntPtr(mainWindow.HWnd)); + SetForegroundWindow(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 @@ private void DebuggerEvents_OnEnterDesignMode(dbgEventReason reason) 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..1474eac 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,24 @@ Godot - + + x86 + + + x86 + + + x86 + + + amd64 + + + amd64 + + + amd64 + @@ -30,6 +47,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..325bcd3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ Visual Studio extension for the Godot game engine C# projects. ## Requirements - **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. +- **Visual Studio 2022**. VS 2019 or earlier are not supported. +- **Visit 1.x** branch to get the **Visual Studio 2019** supported version. ## Features