Cli: Add-module should remove redundant projects from test folder

resolves https://github.com/abpframework/abp/issues/8819
pull/8820/head
Yunus Emre Kalkan 5 years ago
parent d878b3ebb4
commit 0ecaf10a76

@ -301,13 +301,21 @@ namespace Volo.Abp.Cli.ProjectModification
private async Task RemoveProjectFromSolutionAsync(string moduleSolutionFile, string projectName)
{
await SolutionFileModifier.RemoveProjectFromSolutionFileAsync(moduleSolutionFile, projectName);
await SolutionFileModifier.RemoveProjectFromSolutionFileAsync(moduleSolutionFile, projectName);
var projectFolderPath = Path.Combine(Path.GetDirectoryName(moduleSolutionFile), "src", projectName);
var projectFolderPath = Path.Combine(Path.GetDirectoryName(moduleSolutionFile), "src", projectName);
if (Directory.Exists(projectFolderPath))
{
Directory.Delete(projectFolderPath, true);
}
else
{
projectFolderPath = Path.Combine(Path.GetDirectoryName(moduleSolutionFile), "test", projectName);
if (Directory.Exists(projectFolderPath))
{
Directory.Delete(projectFolderPath, true);
}
}
}
private void ChangeDomainTestReferenceToMongoDB(ModuleWithMastersInfo module, string moduleSolutionFile)

Loading…
Cancel
Save