diff --git a/tools/CustomBuildTool/Program.cs b/tools/CustomBuildTool/Program.cs index cbb6c9aa2510..9ecb59d5abb2 100644 --- a/tools/CustomBuildTool/Program.cs +++ b/tools/CustomBuildTool/Program.cs @@ -264,10 +264,19 @@ public static void Main(string[] args) { Build.SetupBuildEnvironment(true); - if (!Build.BuildSolution("SystemInformer.sln", BuildFlags.Release)) - return; - if (!Build.BuildSolution("plugins\\Plugins.sln", BuildFlags.Release)) - return; + try + { + Build.ExportDefinitions(true); + + if (!Build.BuildSolution("SystemInformer.sln", BuildFlags.Release)) + return; + if (!Build.BuildSolution("plugins\\Plugins.sln", BuildFlags.Release)) + return; + } + finally + { + Build.ExportDefinitionsRevert(); + } if (!Build.CopyDebugEngineFiles(BuildFlags.Release)) Environment.Exit(1);