Ends in:
5 DAYS
17 HRS
16 MIN
49 SEC
Ends in:
5 D
17 H
16 M
49 S
Open Closed

ABP Suite v9.0.0 Generates Invalid Code #8333


User avatar
0
johnholliday created
  • Template: app
  • Created ABP Studio Version: 0.9.11
  • Tiered: No
  • UI Framework: blazor-server
  • Theme: leptonx
  • Theme Style: dark
  • Database Provider: mongodb
  • Mobile Framework: none
  • Public Website: No
  • Optional Modules:
    • GDPR
    • LanguageManagement
    • AuditLogging
    • SaaS
    • OpenIddictAdmin

Using AbpStudio 0.9.11 and AbpSuite 9.0.0, I'm encountering a lot of issues with unresolved references.

ABP Studio:

  • Create new solution (Layered Blazor Server; MongoDb)
  • Build and run => success
  • Create new 'Clients' module (Layered Blazor Server; MongoDb)
  • Build and run => success
  • Import Clients module into solution (defaults)
  • Build and run => success
  • Open ABP Suite from Studio for Clients
  • Create ClientProfile entity (few properties)
  • Generate CRUD Page for ClientProfile
  • Build Clients module => FAIL
// Project: Clients.Blazor
// File: ClientProfiles.razor.cs
error CS0115: 'ClientProfiles.OnInitializedAsync()':no sutiable method found to override
error CS0115: 'ClientProfiles.OnAfterRenderAsync(bool)': no suitable method found to override
error CS0246: The type of namespace name 'ClientsComponentBase' could not be found (are you missing a using directive or an assembly reference?)
error CS0103: The name 'AuthorizationService' does not exist in the current context.

Similar issues for any project. The following is from a Projects module.


2 Answer(s)
  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    Hi sorry for the late response. I'll check and write you back asap.

  • User Avatar
    0
    EngincanV created
    Support Team .NET Developer

    I'm able to reproduce the problem and will create an internal issue for that. For a quick workaround, please apply the following steps:

    • In your ClientProfiles.razor file, there is a @inherits statement as below, please create a manual file as below that matches this base component class:

    using Clients.Localization;
    using Volo.Abp.AspNetCore.Components;
    
    namespace Clients.Blazor;
    
    public class ClientsComponentBase : AbpComponentBase
    {
        public ClientsComponentBase()
        {
            LocalizationResource = typeof(ClientsResource);
        }
    }
    

    After this there is only one problem that should be left, and it's in your test project.

    • In your test project create a class as below:
    public class ProjectsTestConsts
    {
        public const string CollectionDefinitionName = "Projects collection";
    }
    

    Then, you should be able to build & run the application.


    These two problems will be fixed in the next release. Best regards.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 26, 2024, 12:49