ABP.IO CLI:尝试使用 repo 中的 templates\app 文件夹从自定义模板创建应用程序

Posted

技术标签:

【中文标题】ABP.IO CLI:尝试使用 repo 中的 templates\\app 文件夹从自定义模板创建应用程序【英文标题】:ABP.IO CLI: Trying to use create an application from a custom template using templates\app folder from the repoABP.IO CLI:尝试使用 repo 中的 templates\app 文件夹从自定义模板创建应用程序 【发布时间】:2021-11-01 10:22:12 【问题描述】:

我将https://github.com/abpframework/abp 克隆到 D:\abp 我正在关注文档:https://docs.abp.io/en/abp/latest/CLI-New-Command-Samples

我想使用 D:\abp\templates\app 目录中的模板创建 MVC UI,Entity Framework Core,没有移动应用程序。 所以我想使用: -自定义模板 - 本地 ABP 框架参考

我想在这个页面内做一个简单的改变: D:\abp\templates\app\aspnet-core\src\MyCompanyName.MyProjectName.Web\Pages\Index.cshtml

来自:

欢迎使用应用程序

欢迎使用我的新应用程序

我发出了这个命令:

D:\TestApps>abp new Acme.BookStore -t app -csf true -u mvc -d ef --tiered -separate-identity-server --no-random-port --connection-string "服务器=localhost;数据库=测试;Trusted_Connection=True" --template-source D:\abp\templates\app --local-framework-ref --abp-path D:\abp

似乎 abp.io cli 需要一个 .specific 版本的 .zip 文件在此处:D:\abp\templates\app\ 并且需要将文件夹压缩到 app-4.4.3.zip 中: -角度 -aspnet 核心 -react-native

这是故意的吗?文档是否应该提到我们需要为特定类型的入门模板压缩文件夹?

这是错误:

[05:56:38 INF] ABP CLI (https://abp.io)
[05:56:39 INF] Version 4.4.3 (Stable)
[05:56:40 INF] Creating your project...
[05:56:40 INF] Project name: Acme.BookStore
[05:56:40 INF] Template: app
[05:56:40 INF] Tiered: yes
[05:56:40 INF] Database provider: EntityFrameworkCore
[05:56:40 INF] Connection string: Server=localhost;Database=TestRenaming;Trusted_Connection=True
[05:56:40 INF] UI Framework: Mvc
[05:56:40 INF] GitHub Abp Local Repository Path: D:\abp
[05:56:40 INF] Template Source: D:\abp\templates\app
[05:56:40 INF] Output folder: D:\TestApps\Acme.BookStore
[05:56:41 INF] Using local template: app, version: 4.4.3
[05:56:41 ERR] Could not find file 'D:\abp\templates\app\app-4.4.3.zip'.
System.IO.FileNotFoundException: Could not find file 'D:\abp\templates\app\app-4.4.3.zip'.

【问题讨论】:

他们好像忘记更新模板了 【参考方案1】:

It seems it is by design that abp cli expects a zipped themplates with versioning. They should mentioned that in the documentation

【讨论】:

以上是关于ABP.IO CLI:尝试使用 repo 中的 templates\app 文件夹从自定义模板创建应用程序的主要内容,如果未能解决你的问题,请参考以下文章

在从 UI (ABP.IO) 创建租户的过程中创建新角色(通过代码)

更改 ABP.IO 的表前缀和架构

开发人员使用哪种设计模式 Abp 框架 (abp.io)?

将 Flutter 应用与 abp.io 框架连接起来

Abp.io 异常:激活 Castle.Proxies.ProcessesServiceProxy 时引发异常

abp.io - 扩展用户配置文件