作者:lovely叫我龙哥 | 来源:互联网 | 2023-09-16 00:44
Overview
Initially, this tool will have some functionalities:
- Create a new solution using ABP.
- Add a module to an existing solution.
- Upgrade ABP modules/packages easily.
Details
A draft example command to create a new solution:
1 2 3
| `
abp new Acme.PhoneBook -orm EF
abp new Acme.PhoneBook -orm EF -ui Angular |
`
A draft example command to add a new application module to an existing solution (.sln):
1 2 3
| `
abp add-module Blogging
abp add-module Blogging -orm MongoDB |
`
- It should be executed at the folder of the .sln file.
- This example adds Blogging module to the solution.
- Blogging module (somehow) define how to add itself to an existing solution respecting to the layering.
- It also adds [DependsOn(...)] attributes to related module definition classes.
- It may make additional changes in the codebase (for example, adds itself to EF Core migration dbcontext, run add-migration command...)
Note that a module (like Blogging) may contain multiple nuget packages.
A draft example command to add a new package to an existing project (.csproj):
1 2
| `
abp add-module Volo.Abp.RabbitMQ |
`
- It should be executed at the folder of a .csproj file.
- This example adds Volo.Abp.RabbitMQ package to the project as a nuget package.
- It also adds [DependsOn(...)] attribute to the module definition class in the project.
- It may make additional changes in the codebase (for example, adds itself to EF Core migration dbcontext, run add-migration command... if defined)
Some Resources
- .NET Core Global Tools overview: https://docs.microsoft.com/dotnet/core/tools/global-tools
- An example implementation for ASP.NET Boilerplate: https://github.com/personball/Abp-CLI
该提问来源于开源项目:abpframework/abp
This is done and already documented. Will be available with new features with the v0.18.