From 7f27152c0a7cf03e1d12a21cc32a5e08761ad450 Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Fri, 5 Dec 2025 19:51:09 +1000 Subject: [PATCH] Set MSBuild Environment Variable --- src/SharpIDE.Godot/IdeWindow.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SharpIDE.Godot/IdeWindow.cs b/src/SharpIDE.Godot/IdeWindow.cs index 718bd71..56c4146 100644 --- a/src/SharpIDE.Godot/IdeWindow.cs +++ b/src/SharpIDE.Godot/IdeWindow.cs @@ -3,6 +3,7 @@ using Microsoft.Extensions.Hosting; using SharpIDE.Application.Features.Build; using SharpIDE.Godot.Features.IdeSettings; using SharpIDE.Godot.Features.SlnPicker; +using Environment = System.Environment; namespace SharpIDE.Godot; @@ -24,6 +25,8 @@ public partial class IdeWindow : Control GD.Print("IdeWindow _Ready called"); ResourceLoader.LoadThreadedRequest(SlnPickerScenePath); ResourceLoader.LoadThreadedRequest(IdeRootScenePath); + // Godot doesn't have an easy equivalent of launchsettings.json, and we also want this to be set for published builds + Environment.SetEnvironmentVariable("MSBUILD_PARSE_SLN_WITH_SOLUTIONPERSISTENCE", "1"); SharpIdeMsbuildLocator.Register(); GodotOtelExtensions.AddServiceDefaults(); Singletons.AppState = AppStateLoader.LoadAppStateFromConfigFile();