From 4a30289eee92cbfae81795bfdb2bcca9ae917756 Mon Sep 17 00:00:00 2001 From: Ignacio Etcheverry Date: Wed, 22 Jul 2020 14:28:47 +0200 Subject: [PATCH] C#: Fix restore not called when building game projects --- .../editor/GodotTools/GodotTools/Build/BuildSystem.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs index 34e42489eb8..d9862ae3618 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildSystem.cs @@ -118,9 +118,14 @@ namespace GodotTools.Build string arguments = string.Empty; if (buildTool == BuildTool.DotnetCli) - arguments += "msbuild "; // `dotnet msbuild` command + arguments += "msbuild"; // `dotnet msbuild` command - arguments += $@"""{buildInfo.Solution}"" /t:{string.Join(",", buildInfo.Targets)} " + + arguments += $@" ""{buildInfo.Solution}"""; + + if (buildInfo.Restore) + arguments += " /restore"; + + arguments += $@" /t:{string.Join(",", buildInfo.Targets)} " + $@"""/p:{"Configuration=" + buildInfo.Configuration}"" /v:normal " + $@"""/l:{typeof(GodotBuildLogger).FullName},{GodotBuildLogger.AssemblyPath};{buildInfo.LogsDirPath}""";