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 fe5057709d..325999cfc1 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 @@ -10,6 +10,8 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps private readonly string _solutionFilePath; private readonly string _projectFolderPath; + private string ProjectNameWithQuotes => $"\"{_projectName}\""; + public RemoveProjectFromSolutionStep( string projectName, string solutionFilePath = null, @@ -59,7 +61,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Building.Steps { foreach (var solutionFileLine in solutionFileLines) { - if (solutionFileLine.Contains(_projectName)) + if (solutionFileLine.Contains(ProjectNameWithQuotes)) { var curlyBracketStartIndex = solutionFileLine.LastIndexOf("{", StringComparison.OrdinalIgnoreCase); var curlyBracketEndIndex = solutionFileLine.LastIndexOf("}", StringComparison.OrdinalIgnoreCase);