EasyAbp / AbpHelper.CLI

Providing code generation and more features to help you develop applications and modules with the ABP framework.
MIT License
285 stars 95 forks source link

Cannot generate CRUD code, even a simplest entity with just one property #169

Closed Li-Yanzhi closed 2 years ago

Li-Yanzhi commented 2 years ago

1. Environment

.NET SDK: 6.0.102 ASPNetCore: 6.0.2 volo.abp.cli: 5.1.3 easyabp.abphelper: 0.8.3

2. Entity

public class Contact : AggregateRoot<Guid>
{
    public string Name { get; set; }
}

3. Error

When run abphelper generate crud Contact -d D:\Dev\abp\AddressBook, the error will be thrown as bellow:

[23:00:46 INF] Use directory: `D:\Dev\abp\AddressBook`
[23:00:47 INF] Command 'crud' started.
[23:00:47 DBG] ProjectInfoProviderStep Input [baseDirectory]: 'D:\Dev\abp\AddressBook'
[23:00:47 DBG] ProjectInfoProviderStep Input [excludeDirectories]:
[23:00:47 DBG] ProjectInfoProviderStep Output [projectInfo]: 'BaseDirectory: D:\Dev\abp\AddressBook, FullName: AddressBook, Name: AddressBook, TemplateType: Application, UiFramework: RazorPages, Tiered: False'
[23:00:47 DBG] FileFinderStep Input [baseDirectory]: 'D:\Dev\abp\AddressBook'
[23:00:47 DBG] FileFinderStep Input [excludeDirectories]:
[23:00:47 DBG] FileFinderStep Input [searchFileName]: 'Contact.cs'
[23:00:47 DBG] FileFinderStep Input [errorIfNotFound]: 'True'
[23:00:47 DBG] FileFinderStep Output [filePathName]: Found file: 'D:\Dev\abp\AddressBook\src\AddressBook.Domain\Contacts\Contact.cs', stored in parameter: 'FileFinderResult'
[23:00:47 DBG] EntityParserStep Input [entityFile]: 'D:\Dev\abp\AddressBook\src\AddressBook.Domain\Contacts\Contact.cs'
[23:00:47 ERR] Parsing entity failed.
EasyAbp.AbpHelper.Core.Steps.Abp.ParseException: Exception of type 'EasyAbp.AbpHelper.Core.Steps.Abp.ParseException' was thrown.
   at EasyAbp.AbpHelper.Core.Steps.Abp.EntityParserStep.OnExecuteAsync(WorkflowExecutionContext context, CancellationToken cancellationToken) in D:\Repos\EasyAbp\AbpHelper.CLI\src\AbpHelper.Core\Steps\Abp\EntityParserStep.cs:line 44
[23:00:48 ERR] (4,31): error CS1514: { expected
[23:00:48 ERR] (9,2): error CS1513: } expected
[23:00:48 ERR] Error while invoking activity activity-8 of workflow fb4f2b5d6259486ea629d376090d40d1
EasyAbp.AbpHelper.Core.Steps.Abp.ParseException: Exception of type 'EasyAbp.AbpHelper.Core.Steps.Abp.ParseException' was thrown.
   at EasyAbp.AbpHelper.Core.Steps.Abp.EntityParserStep.OnExecuteAsync(WorkflowExecutionContext context, CancellationToken cancellationToken) in D:\Repos\EasyAbp\AbpHelper.CLI\src\AbpHelper.Core\Steps\Abp\EntityParserStep.cs:line 44
   at Elsa.Services.ActivityInvoker.InvokeAsync(WorkflowExecutionContext workflowContext, IActivity activity, Func`2 invokeAction)
[23:00:48 ERR] Error activity: {
  "Name": null
}

Is abphelper v0.8.3 not compatible with ABP v5.1.3?

Thanks

gdlcf88 commented 2 years ago

This may be related to https://github.com/EasyAbp/AbpHelper.CLI/pull/168