Use latest sdk found by msbuild locator

This commit is contained in:
Matt Parker
2025-11-16 15:57:59 +10:00
parent 21519da4d8
commit 19eff28835

View File

@@ -26,7 +26,10 @@ public partial class IdeWindow : Control
GD.Print("IdeWindow _Ready called"); GD.Print("IdeWindow _Ready called");
ResourceLoader.LoadThreadedRequest(SlnPickerScenePath); ResourceLoader.LoadThreadedRequest(SlnPickerScenePath);
ResourceLoader.LoadThreadedRequest(IdeRootScenePath); 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(); GodotOtelExtensions.AddServiceDefaults();
Singletons.AppState = AppStateLoader.LoadAppStateFromConfigFile(); Singletons.AppState = AppStateLoader.LoadAppStateFromConfigFile();
//GetWindow().SetMinSize(new Vector2I(1152, 648)); //GetWindow().SetMinSize(new Vector2I(1152, 648));