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.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 20, 2025, 18:00