From c8622d180122f60ba93fcbaa7080eb469c86fbbe Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Fri, 20 Jun 2025 15:26:58 -0500 Subject: [PATCH] Change method name from add to restore. --- Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs | 2 +- .../Tools/Flax.Build/Build/NativeCpp/Builder.NativeCpp.cs | 4 ++-- Source/Tools/Flax.Build/Utilities/Utilities.cs | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs b/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs index 5d1e90a5a..23646a3d7 100644 --- a/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs +++ b/Source/Tools/Flax.Build/Build/DotNet/Builder.DotNet.cs @@ -150,7 +150,7 @@ namespace Flax.Build { var path = Path.Combine(nugetPath, reference.Name, reference.Version, "lib", reference.Framework, $"{reference.Name}.dll"); if (!File.Exists(path)) - Utilities.AddNugetPackage(graph, target, reference); + Utilities.RestoreNugetPackages(graph, target); var dstFile = Path.Combine(outputPath, Path.GetFileName(path)); graph.AddCopyFile(dstFile, path); } diff --git a/Source/Tools/Flax.Build/Build/NativeCpp/Builder.NativeCpp.cs b/Source/Tools/Flax.Build/Build/NativeCpp/Builder.NativeCpp.cs index f88a111f6..18459ddb5 100644 --- a/Source/Tools/Flax.Build/Build/NativeCpp/Builder.NativeCpp.cs +++ b/Source/Tools/Flax.Build/Build/NativeCpp/Builder.NativeCpp.cs @@ -1065,7 +1065,7 @@ namespace Flax.Build { var path = Path.Combine(nugetPath, reference.Name, reference.Version, "lib", reference.Framework, $"{reference.Name}.dll"); if (!File.Exists(path)) - Utilities.AddNugetPackage(graph, target, reference); + Utilities.RestoreNugetPackages(graph, target); var dstFile = Path.Combine(outputPath, Path.GetFileName(path)); graph.AddCopyFile(dstFile, path); } @@ -1278,7 +1278,7 @@ namespace Flax.Build { var path = Path.Combine(nugetPath, reference.Name, reference.Version, "lib", reference.Framework, $"{reference.Name}.dll"); if (!File.Exists(path)) - Utilities.AddNugetPackage(graph, target, reference); + Utilities.RestoreNugetPackages(graph, target); var dstFile = Path.Combine(outputPath, Path.GetFileName(path)); graph.AddCopyFile(dstFile, path); } diff --git a/Source/Tools/Flax.Build/Utilities/Utilities.cs b/Source/Tools/Flax.Build/Utilities/Utilities.cs index 484aad59f..7552849b3 100644 --- a/Source/Tools/Flax.Build/Utilities/Utilities.cs +++ b/Source/Tools/Flax.Build/Utilities/Utilities.cs @@ -42,18 +42,17 @@ namespace Flax.Build } /// - /// Downloads a nuget package. + /// Restores a targets nuget packages. /// /// The task graph. /// The target. /// The dotnet path. - /// - public static void AddNugetPackage(Graph.TaskGraph graph, Target target, NativeCpp.NugetPackage package) + public static void RestoreNugetPackages(Graph.TaskGraph graph, Target target) { var dotNetPath = GetDotNetPath(); var task = graph.Add(); task.WorkingDirectory = target.FolderPath; - task.InfoMessage = $"Add Nuget Package: {package.Name}, Version {package.Version}"; + task.InfoMessage = $"Restoring Nuget Packages for {target.Name}"; task.CommandPath = dotNetPath; task.CommandArguments = $"restore"; }