From 196a206107dbe655f570024ed450c972231e7e37 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 17 Sep 2020 15:29:56 +0300 Subject: [PATCH] RemoveProjectFromSolutionStep notfound tolarence resolves https://github.com/abpframework/abp/issues/5453 --- .../Building/Steps/RemoveProjectFromSolutionStep.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/RemoveProjectFromSolutionStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/RemoveProjectFromSolutionStep.cs index 497a38c4b1..7b48c780f1 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/RemoveProjectFromSolutionStep.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/RemoveProjectFromSolutionStep.cs @@ -33,6 +33,12 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps private List RemoveProject(List solutionFileLines) { var projectKey = FindProjectKey(solutionFileLines); + + if (projectKey == null) + { + return solutionFileLines; + } + var newSolutionFileLines = new List(); var firstOccurence = true; @@ -67,7 +73,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps } } - throw new ApplicationException($"The solution file '{_solutionFilePath}' does not contain a project '{_projectName}'"); + return null; } } -} \ No newline at end of file +}