Open Closed

Angular Module Creation in ABP Suite Fails to Generate Entity Files #5849


User avatar
0
mohammedalqaisi created
  • ABP Framework version: v6.0.0
  • UI Type: Angular
  • Database System: EF Core SQL Server
  • Auth Server Separated: yes
  • Steps to reproduce the issue:
    • Create a project name MyCompany.MyProject
    • Using a Abp Suite add new module name MyCompany.Framework.Finance
    • Add the newly created module to Abp Suite
    • Using Crud page generator add new Entity the Suite create the entity successfully but didn't generate the angular files

below the config from the suite appSettings.json

Note: When adding the newly created module from the suite the AngularSolutionRootPath value is **null **, UiFramework=2 ,UiFrameworkName="MVC"

{
    "IsDotnetEfCoreToolInstalled": true,
    "Solutions": [
        {
            "AbpVersion": "6.0.0",
            "ActiveDate": "2023-09-23T02:48:04.8084703+03:00",
            "AngularSolutionRootPath": "D:\\_Source\\Repos\\MyCompany.MyProject\\angular",
            "ApplicationContractsExists": true,
            "ApplicationContractsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Application.Contracts",
            "ApplicationProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Application",
            "ApplicationTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test\\MyCompany.MyProject.Application.Tests",
            "BlazorProjectDirectory": null,
            "DatabaseProvider": 1,
            "DatabaseProviderName": "EntityFrameworkCore",
            "DbContextFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore\\EntityFrameworkCore\\MyProjectDbContext.cs",
            "DbContextModelCreatingExtensionsFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore\\EntityFrameworkCore\\MyProjectDbContext.cs",
            "DefaultNamespace": "MyCompany.MyProject",
            "DefaultNamespaceAsCamelCase": "myCompany.myproject",
            "DomainProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Domain",
            "DomainSharedProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.Domain.Shared",
            "EntityFrameworkCoreDbMigrationsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore",
            "EntityFrameworkCoreProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.EntityFrameworkCore",
            "EntityFrameworkCoreTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test\\MyCompany.MyProject.EntityFrameworkCore.Tests",
            "HttpApiHostProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.HttpApi.Host",
            "HttpApiProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.HttpApi",
            "Id": "68caa486-a030-4773-ab6d-b4a32047d08e",
            "IsTieredArchitecture": true,
            "MigrationsMigrationsDbContext": "MyProjectDbContext",
            "MigratorCsprojFileName": "MyCompany.MyProject.DbMigrator.csproj",
            "MigratorProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.DbMigrator",
            "MigratorProjectExists": true,
            "MongoDbProjectDirectory": null,
            "MongoDbTestsProjectDirectory": null,
            "Name": "MyCompany.MyProject",
            "NolayerProjectDirectory": null,
            "OnlyProjectName": "MyProject",
            "Path": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\MyCompany.MyProject.sln",
            "ProjectNameWithCompanyName": "MyCompany.MyProject",
            "ProjectTemplateType": 1,
            "RootProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core",
            "SrcFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src",
            "StartupProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\src\\MyCompany.MyProject.HttpApi.Host",
            "StartupProjectName": "MyCompany.MyProject.HttpApi.Host",
            "TenantDbContextFilePath": null,
            "TenantMigrationsMigrationsDbContext": "MyProjectTenantDbContext",
            "TestBaseProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test\\MyCompany.MyProject.TestBase",
            "TestFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\test",
            "UiFramework": 3,
            "UiFrameworkName": "Angular",
            "UpdateDatabaseMethod": 1,
            "WebProjectDirectory": null
        },
        {
            "AbpVersion": "6.0.0",
            "ActiveDate": "2023-09-25T09:55:40.588693+03:00",
            "AngularSolutionRootPath": "D:\\_Source\\Repos\\MyCompany.MyProject\\angular\\projects\\dynamic-entities",
            "ApplicationContractsExists": true,
            "ApplicationContractsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Application.Contracts",
            "ApplicationProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Application",
            "ApplicationTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test\\MyCompany.Framework.DynamicEntities.Application.Tests",
            "BlazorProjectDirectory": null,
            "DatabaseProvider": 1,
            "DatabaseProviderName": "EntityFrameworkCore",
            "DbContextFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore\\EntityFrameworkCore\\DynamicEntitiesDbContext.cs",
            "DbContextModelCreatingExtensionsFilePath": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore\\EntityFrameworkCore\\DynamicEntitiesDbContextModelCreatingExtensions.cs",
            "DefaultNamespace": "MyCompany.Framework.DynamicEntities",
            "DefaultNamespaceAsCamelCase": "myCompany.framework.dynamicEntities",
            "DomainProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Domain",
            "DomainSharedProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.Domain.Shared",
            "EntityFrameworkCoreDbMigrationsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore",
            "EntityFrameworkCoreProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore",
            "EntityFrameworkCoreTestsProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test\\MyCompany.Framework.DynamicEntities.EntityFrameworkCore.Tests",
            "HttpApiHostProjectDirectory": null,
            "HttpApiProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src\\MyCompany.Framework.DynamicEntities.HttpApi",
            "Id": "08f9b6ec-1341-4586-b00c-27765e6187a1",
            "IsTieredArchitecture": false,
            "MigrationsMigrationsDbContext": "DynamicEntitiesMigrationsDbContext",
            "MigratorCsprojFileName": "MyCompany.Framework.DynamicEntities.DbMigrator.csproj",
            "MigratorProjectDirectory": null,
            "MigratorProjectExists": false,
            "MongoDbProjectDirectory": null,
            "MongoDbTestsProjectDirectory": null,
            "Name": "MyCompany.Framework.DynamicEntities",
            "NolayerProjectDirectory": null,
            "OnlyProjectName": "DynamicEntities",
            "Path": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\MyCompany.Framework.DynamicEntities.sln",
            "ProjectNameWithCompanyName": "MyCompany.Framework.DynamicEntities",
            "ProjectTemplateType": 2,
            "RootProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities",
            "SrcFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\src",
            "StartupProjectDirectory": null,
            "StartupProjectName": null,
            "TenantDbContextFilePath": null,
            "TenantMigrationsMigrationsDbContext": "DynamicEntitiesTenantMigrationsDbContext",
            "TestBaseProjectDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test\\MyCompany.Framework.DynamicEntities.TestBase",
            "TestFolderDirectory": "D:\\_Source\\Repos\\MyCompany.MyProject\\aspnet-core\\modules\\MyCompany.Framework.DynamicEntities\\test",
            "UiFramework": 3,
            "UiFrameworkName": "Angular",
            "UpdateDatabaseMethod": 1,
            "WebProjectDirectory": null
        }
    ]
}

4 Answer(s)
  • User Avatar
    0
    mohammedalqaisi created

    Attched the genration logs

    ``2023-09-25 09:55:24.385 +03:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.GetPropertyTypes (Volo.Abp.Suite)'
    2023-09-25 09:55:24.385 +03:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/api/abpSuite/crudPageGenerator/get-property-types?uiFrameworkName=Mvc application/json - - 200 - application/json;+charset=utf-8 2.5816ms
    2023-09-25 09:55:40.488 +03:00 [INF] Request starting HTTP/1.1 GET http://localhost:3000/api/abpSuite/solutions/08f9b6ec-1341-4586-b00c-27765e6187a1/is-built application/json -
    2023-09-25 09:55:40.488 +03:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.AbpSuiteController.IsSolutionBuiltAsync (Volo.Abp.Suite)'
    2023-09-25 09:55:40.489 +03:00 [INF] Route matched with {action = "IsSolutionBuilt", controller = "AbpSuite", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[System.Boolean] IsSolutionBuiltAsync(System.Guid) on controller Volo.Abp.Suite.Controllers.AbpSuiteController (Volo.Abp.Suite).
    2023-09-25 09:55:40.577 +03:00 [INF] Executing ObjectResult, writing value of type 'System.Boolean'.
    2023-09-25 09:55:40.577 +03:00 [INF] Executed action Volo.Abp.Suite.Controllers.AbpSuiteController.IsSolutionBuiltAsync (Volo.Abp.Suite) in 88.7147ms
    2023-09-25 09:55:40.577 +03:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.AbpSuiteController.IsSolutionBuiltAsync (Volo.Abp.Suite)'
    2023-09-25 09:55:40.577 +03:00 [INF] Request finished HTTP/1.1 GET http://localhost:3000/api/abpSuite/solutions/08f9b6ec-1341-4586-b00c-27765e6187a1/is-built application/json - - 200 - application/json;+charset=utf-8 89.0619ms
    2023-09-25 09:55:40.581 +03:00 [INF] Request starting HTTP/1.1 POST http://localhost:3000/api/abpSuite/crudPageGenerator/08f9b6ec-1341-4586-b00c-27765e6187a1/save-and-generate-entity application/json 1701
    2023-09-25 09:55:40.581 +03:00 [INF] Executing endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'
    2023-09-25 09:55:40.582 +03:00 [INF] Route matched with {controller = "crudPageGenerator", action = "SaveAndGenerateEntity", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.NoContentResult] SaveAndGenerateEntityAsync(System.Guid, Volo.Abp.Suite.Models.EntityModel) on controller Volo.Abp.Suite.Controllers.CrudPageGeneratorController (Volo.Abp.Suite).
    2023-09-25 09:55:40.794 +03:00 [INF] 
    === ENTITY GENERATION STARTED === 
    * SOLUTION: MyProject.Framework.Finance
    * ENTITY:{
      "Id": "1405674c-a8ad-4c53-a1d9-1f57757c086c",
      "Name": "Symbol",
      "OriginalName": "Symbol",
      "NamePlural": "Symbols",
      "DatabaseTableName": "Symbols",
      "Namespace": "Symbols",
      "BaseClass": "AuditedEntity",
      "MenuIcon": "file-alt",
      "PrimaryKeyType": "Guid",
      "IsMultiTenant": false,
      "CheckConcurrency": true,
      "ShouldCreateUserInterface": true,
      "ShouldCreateBackend": true,
      "ShouldExportExcel": false,
      "ShouldAddMigration": true,
      "ShouldUpdateDatabase": true,
      "CreateTests": true,
      "Properties": [
        {
          "Id": "6ac4a090-3afb-497b-ab3c-d9189a659e51",
          "Name": "Name",
          "Type": "string",
          "EnumType": "",
          "EnumNamespace": "",
          "EnumAngularImport": "shared/enums",
          "EnumFilePath": null,
          "DefaultValue": null,
          "IsNullable": false,
          "IsRequired": true,
          "IsTextArea": false,
          "MinLength": null,
          "MaxLength": 500,
          "SortOrder": 0,
          "SortType": 0,
          "Regex": "",
          "EmailValidation": false,
          "EnumValues": null,
          "IsSelected": true,
          "OrdinalIndex": 0
        },
        {
          "Id": "3a9a0653-9cb5-41bd-9315-d6841e7137ac",
          "Name": "Type",
          "Type": "string",
          "EnumType": "",
          "EnumNamespace": "",
          "EnumAngularImport": "shared/enums",
          "EnumFilePath": null,
          "DefaultValue": null,
          "IsNullable": false,
          "IsRequired": true,
          "IsTextArea": false,
          "MinLength": null,
          "MaxLength": 50,
          "SortOrder": 0,
          "SortType": 0,
          "Regex": "",
          "EmailValidation": false,
          "EnumValues": null,
          "IsSelected": true,
          "OrdinalIndex": 0
        },
        {
          "Id": "ae00cf5c-e2f8-462b-be48-c38e67e5bda3",
          "Name": "Value",
          "Type": "string",
          "EnumType": "",
          "EnumNamespace": "",
          "EnumAngularImport": "shared/enums",
          "EnumFilePath": null,
          "DefaultValue": null,
          "IsNullable": false,
          "IsRequired": true,
          "IsTextArea": false,
          "MinLength": null,
          "MaxLength": 1000,
          "SortOrder": 0,
          "SortType": 0,
          "Regex": "",
          "EmailValidation": false,
          "EnumValues": null,
          "IsSelected": true,
          "OrdinalIndex": 0
        }
      ],
      "NavigationProperties": [],
      "NavigationConnections": [],
      "PhysicalFileName": "Symbol.json"
    }
    
    2023-09-25 09:55:40.794 +03:00 [INF] 1/8 - EntityGenerateCommand started...
    2023-09-25 09:55:40.887 +03:00 [INF] 1/8 - EntityGenerateCommand completed.                    | Duration: 93 ms.
    2023-09-25 09:55:40.887 +03:00 [INF] 2/8 - RepositoryCommand started...
    2023-09-25 09:55:40.931 +03:00 [INF] 2/8 - RepositoryCommand completed.                        | Duration: 44 ms.
    2023-09-25 09:55:40.931 +03:00 [INF] 3/8 - ManagerCommand started...
    2023-09-25 09:55:40.939 +03:00 [INF] 3/8 - ManagerCommand completed.                           | Duration: 7 ms.
    2023-09-25 09:55:40.939 +03:00 [INF] 4/8 - AppServiceCommand started...
    2023-09-25 09:55:40.994 +03:00 [INF] 4/8 - AppServiceCommand completed.                        | Duration: 54 ms.
    2023-09-25 09:55:40.994 +03:00 [INF] 5/8 - ProxyControllerCommand started...
    2023-09-25 09:55:41.002 +03:00 [INF] 5/8 - ProxyControllerCommand completed.                   | Duration: 8 ms.
    2023-09-25 09:55:41.002 +03:00 [INF] 6/8 - PermissionCommand started...
    2023-09-25 09:55:41.033 +03:00 [INF] 6/8 - PermissionCommand completed.                        | Duration: 30 ms.
    2023-09-25 09:55:41.033 +03:00 [INF] 7/8 - ApplicationObjectMappingCommand started...
    2023-09-25 09:55:41.040 +03:00 [INF] 7/8 - ApplicationObjectMappingCommand completed.          | Duration: 6 ms.
    2023-09-25 09:55:41.040 +03:00 [INF] 8/8 - UnitTestCommandCommand started...
    2023-09-25 09:55:41.064 +03:00 [INF] 8/8 - UnitTestCommandCommand completed.                   | Duration: 23 ms.
    2023-09-25 09:55:41.064 +03:00 [INF] Entity generation completed in 0 sec.
    2023-09-25 09:55:41.065 +03:00 [INF] Executing StatusCodeResult, setting HTTP status code 204
    2023-09-25 09:55:41.065 +03:00 [INF] Executed action Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite) in 483.0533ms
    2023-09-25 09:55:41.065 +03:00 [INF] Executed endpoint 'Volo.Abp.Suite.Controllers.CrudPageGeneratorController.SaveAndGenerateEntityAsync (Volo.Abp.Suite)'
    
  • User Avatar
    0
    IanW created

    Can you show the output of what is in the terminal of abp suite after trying to generate?

  • User Avatar
    0
    alper created
    Support Team Director

    Are ABP Suite and your project version the same?

  • User Avatar
    0
    masum.ulu created
    Support Team Angular Expert

    Hello mohammedalqaisi,

    You can't create CRUD page for module in created app template project,

    Instead you need to create module separately and give the application project with local reference with that way you can make module development.

    I've refunded your credit

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09