From 179bff9b0f8c316322fa5cf419e1a0d1e721eb26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C3=87A=C4=9EDA=C5=9E?= Date: Tue, 8 Sep 2020 10:33:33 +0300 Subject: [PATCH] pass dotnet build command arguments without double quotes --- .../Cli/Build/DefaultDotNetProjectBuilder.cs | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs index 790721c82c..be6508c8a3 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Build/DefaultDotNetProjectBuilder.cs @@ -3,6 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Drawing; using System.Linq; +using System.Threading.Tasks; using Volo.Abp.Cli.Utils; using Volo.Abp.DependencyInjection; @@ -29,16 +30,17 @@ namespace Volo.Abp.Cli.Build { continue; } - - foreach (var projectDependency in project.Dependencies) - { - if (builtProjects.Contains(project.CsProjPath)) - { - continue; - } - BuildInternal(projectDependency, arguments, builtProjects); - } + Parallel.ForEach( + project.Dependencies, + new ParallelOptions {MaxDegreeOfParallelism = maxParallelBuildCount}, + (projectDependency) => + { + if (!builtProjects.Contains(project.CsProjPath)) + { + BuildInternal(projectDependency, arguments, builtProjects); + } + }); } } catch (Exception e) @@ -51,10 +53,11 @@ namespace Volo.Abp.Cli.Build private void BuildInternal(DotNetProjectInfo project, string arguments, ConcurrentBag builtProjects) { - Console.WriteLine("Building...: dotnet build " + project.CsProjPath + " " + arguments); + var buildArguments = arguments.TrimStart('"').TrimEnd('"'); + Console.WriteLine("Building...: dotnet build " + project.CsProjPath + " " + buildArguments); var output = CmdHelper.RunCmdAndGetOutput( - "dotnet build " + project.CsProjPath + " " + arguments, + "dotnet build " + project.CsProjPath + " " + buildArguments, out int buildStatus );