diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs index 5d228cc176..c014f52d0e 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/NewCommand.cs @@ -220,6 +220,7 @@ public class NewCommand : ProjectCreationCommandBase, IConsoleCommand, ITransien sb.AppendLine(" abp new Acme.BookStore -u angular -d mongodb"); sb.AppendLine(" abp new Acme.BookStore -m none"); sb.AppendLine(" abp new Acme.BookStore -m react-native"); + sb.AppendLine(" abp new Acme.BookStore -m maui"); sb.AppendLine(" abp new Acme.BookStore -d mongodb"); sb.AppendLine(" abp new Acme.BookStore -d mongodb -o d:\\my-project"); sb.AppendLine(" abp new Acme.BookStore -t module"); diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs index d1e54868c4..6b607d4454 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/ProjectCreationCommandBase.cs @@ -137,7 +137,7 @@ public abstract class ProjectCreationCommandBase Logger.LogInformation("Public Web Site: yes"); } - var mobileApp = GetMobilePreference(commandLineArgs); + var mobileApp = GetMobilePreference(commandLineArgs, template); if (mobileApp != MobileApp.None) { Logger.LogInformation("Mobile App: " + mobileApp); @@ -635,7 +635,7 @@ public abstract class ProjectCreationCommandBase } } - protected virtual MobileApp GetMobilePreference(CommandLineArgs commandLineArgs) + protected virtual MobileApp GetMobilePreference(CommandLineArgs commandLineArgs, string template) { var optionValue = commandLineArgs.Options.GetOrNull(Options.Mobile.Short, Options.Mobile.Long); @@ -644,9 +644,9 @@ public abstract class ProjectCreationCommandBase case null: case "none": return MobileApp.None; - case "react-native": + case "react-native" when template is AppProTemplate.TemplateName or MicroserviceProTemplate.TemplateName: return MobileApp.ReactNative; - case "maui": + case "maui" when template is AppProTemplate.TemplateName or MicroserviceProTemplate.TemplateName: return MobileApp.Maui; default: throw new CliUsageException(ExceptionMessageHelper.GetInvalidOptionExceptionMessage("Mobile App"));