diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs index dcb36d7bae..e369690785 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs @@ -107,14 +107,18 @@ namespace Volo.Abp.Cli.ProjectModification private async Task DownloadSourceCodesToSolutionFolder(ModuleWithMastersInfo module, string modulesFolderInSolution, string version = null) { + var targetModuleFolder = Path.Combine(modulesFolderInSolution, module.Name); + await SourceCodeDownloadService.DownloadAsync( module.Name, - Path.Combine(modulesFolderInSolution, module.Name), + targetModuleFolder, version, null, null ); + await DeleteAppFolderAsync(targetModuleFolder); + if (module.MasterModuleInfos == null) { return; @@ -126,6 +130,15 @@ namespace Volo.Abp.Cli.ProjectModification } } + private async Task DeleteAppFolderAsync(string targetModuleFolder) + { + var appFolder = Path.Combine(targetModuleFolder, "app"); + if (Directory.Exists(appFolder)) + { + Directory.Delete(appFolder, true); + } + } + private async Task AddNugetAndNpmReferences(ModuleWithMastersInfo module, string[] projectFiles) { foreach (var nugetPackage in module.NugetPackages)