From a0acc006b0050fffc8b1a253d095f5c635f895e7 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 21 Nov 2024 13:47:16 +0300 Subject: [PATCH 1/2] Added `Using Existing Configuration` section to new command samples resolves https://github.com/volosoft/abp-studio/issues/1051 --- docs/en/cli/new-command-samples.md | 73 ++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/docs/en/cli/new-command-samples.md b/docs/en/cli/new-command-samples.md index 6b168b538c..14cbcb8a27 100644 --- a/docs/en/cli/new-command-samples.md +++ b/docs/en/cli/new-command-samples.md @@ -221,6 +221,79 @@ As seen below, ABP libraries are local project references. ``` +## Using Existing Configuration + +If you want to programmaticaly create solutions, you can use an existing configuration instead of passing parameters to CLI one by one. ABP Studio keeps the solution creation history locally in `(UserProfile)\.abp\studio\solution-creation-history.json` file, there you can find the configurations of the solutions in your machine. + +### Using a Solution Id + +In `*.abpsln` file of the solutions, there is an ID field that you can use to recreate a solution. To do this, pass the id to cli using `-shi or --solution-history-id` parameters. + +```bash +abp new -shi dbb1afa9-190e-419a-842d-2780bb1bad1f +abp new -shi dbb1afa9-190e-419a-842d-2780bb1bad1f -o D:\test\Acme.BookStore +``` + +### Using a JSON Configuration File + +You can also use a configuration file to create solutions. You need to use `-rcp or ready-config-path` parameters to do that. + +```bash +abp new -rcp MyTests\config.json +abp new -rcp D:\MyTests\config.json +abp new -rcp D:\MyTests\config.json -o D:\test\Acme.BookStore +``` + +To prepare a config file, you can check the records in `solution-creation-history.json` file mentioned above. An example config file would look like that: + +```json +{ + "solutionName": { + "fullName": "Acme.BookStore", + "companyName": "Acme", + "projectName": "BookStore" + }, + "pro": true, + "useOpenSourceTemplate": false, + "booksSample": false, + "databaseProvider": "ef", + "createInitialMigration": true, + "runDbMigrator": true, + "uiFramework": "angular", + "theme": "leptonx", + "themeStyle": "system", + "mobileFramework": "none", + "databaseManagementSystem": "sqlserver", + "databaseManagementSystemBuilderExtensionMethod": "UseSqlServer", + "connectionString": "Server=(LocalDb)\\\\MSSQLLocalDB;Database=AbpSoludegdf;Trusted_Connection=True;TrustServerCertificate=true", + "mauiBlazorApplicationIdGuid": "d3499a09-f3d4-4bb7-9d58-4c7b1caee331", + "tiered": false, + "publicWebsite": false, + "cmskit": false, + "openIddictAdmin": true, + "languageManagement": true, + "textTemplateManagement": true, + "multiTenancy": true, + "auditLogging": false, + "gdpr": true, + "chat": false, + "fileManagement": false, + "socialLogins": true, + "includeTests": true, + "distributedEventBus": "none", + "publicRedis": false, + "separateTenantSchema": false, + "progressiveWebApp": false, + "runProgressiveWebAppSupport": false, + "runInstallLibs": false, + "runBundling": false, + "kubernetesConfiguration": true, + "templateName": "app" + } +``` + + + ## See Also * [ABP CLI documentation](../cli/index.md) From d14fa938bb34bb0613d0f80c15b6c256052f98d5 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Thu, 21 Nov 2024 13:48:12 +0300 Subject: [PATCH 2/2] Update new-command-samples.md --- docs/en/cli/new-command-samples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/cli/new-command-samples.md b/docs/en/cli/new-command-samples.md index 14cbcb8a27..a8d469b10b 100644 --- a/docs/en/cli/new-command-samples.md +++ b/docs/en/cli/new-command-samples.md @@ -223,7 +223,7 @@ As seen below, ABP libraries are local project references. ## Using Existing Configuration -If you want to programmaticaly create solutions, you can use an existing configuration instead of passing parameters to CLI one by one. ABP Studio keeps the solution creation history locally in `(UserProfile)\.abp\studio\solution-creation-history.json` file, there you can find the configurations of the solutions in your machine. +If you want to programmaticaly create solutions, you can use an existing configuration instead of passing parameters to CLI one by one. ABP Studio keeps the solution creation history locally in `(UserProfile)\.abp\studio\solution-creation-history.json` file, there you can find the configurations of the solutions created in your machine. ### Using a Solution Id @@ -265,7 +265,7 @@ To prepare a config file, you can check the records in `solution-creation-histor "mobileFramework": "none", "databaseManagementSystem": "sqlserver", "databaseManagementSystemBuilderExtensionMethod": "UseSqlServer", - "connectionString": "Server=(LocalDb)\\\\MSSQLLocalDB;Database=AbpSoludegdf;Trusted_Connection=True;TrustServerCertificate=true", + "connectionString": "Server=(LocalDb)\\\\MSSQLLocalDB;Database=BookStore;Trusted_Connection=True;TrustServerCertificate=true", "mauiBlazorApplicationIdGuid": "d3499a09-f3d4-4bb7-9d58-4c7b1caee331", "tiered": false, "publicWebsite": false,