From 19eff288353ae55a6aba1e621879cd5bffe90609 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Sun, 16 Nov 2025 15:57:59 +1000 Subject: [PATCH] Use latest sdk found by msbuild locator --- src/SharpIDE.Godot/IdeWindow.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/SharpIDE.Godot/IdeWindow.cs b/src/SharpIDE.Godot/IdeWindow.cs index e84fa52..2716f6f 100644 --- a/src/SharpIDE.Godot/IdeWindow.cs +++ b/src/SharpIDE.Godot/IdeWindow.cs @@ -26,7 +26,10 @@ public partial class IdeWindow : Control GD.Print("IdeWindow _Ready called"); ResourceLoader.LoadThreadedRequest(SlnPickerScenePath); ResourceLoader.LoadThreadedRequest(IdeRootScenePath); - MSBuildLocator.RegisterDefaults(); + // Use latest version - https://github.com/microsoft/MSBuildLocator/issues/81 + var instance = MSBuildLocator.QueryVisualStudioInstances().MaxBy(s => s.Version); + if (instance is null) throw new InvalidOperationException("No MSBuild instances found"); + MSBuildLocator.RegisterInstance(instance); GodotOtelExtensions.AddServiceDefaults(); Singletons.AppState = AppStateLoader.LoadAppStateFromConfigFile(); //GetWindow().SetMinSize(new Vector2I(1152, 648));