Set MSBuild Environment Variable

This commit is contained in:
Matt Parker
2025-12-05 19:51:09 +10:00
parent 1916d26907
commit 7f27152c0a

View File

@@ -3,6 +3,7 @@ using Microsoft.Extensions.Hosting;
using SharpIDE.Application.Features.Build; using SharpIDE.Application.Features.Build;
using SharpIDE.Godot.Features.IdeSettings; using SharpIDE.Godot.Features.IdeSettings;
using SharpIDE.Godot.Features.SlnPicker; using SharpIDE.Godot.Features.SlnPicker;
using Environment = System.Environment;
namespace SharpIDE.Godot; namespace SharpIDE.Godot;
@@ -24,6 +25,8 @@ 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);
// 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(); SharpIdeMsbuildLocator.Register();
GodotOtelExtensions.AddServiceDefaults(); GodotOtelExtensions.AddServiceDefaults();
Singletons.AppState = AppStateLoader.LoadAppStateFromConfigFile(); Singletons.AppState = AppStateLoader.LoadAppStateFromConfigFile();