Open Closed

ABP 8 to ABP 10 Auth Service Old Themes/LeptonX code not compile #10562


User avatar
0
DominaTang created

MicroService template.

The Auth Service has the Themes/LeptonX folder under AuthService. I believe there was customize code there which copy the source code of theme. However, after upgrade to ABP 10 from ABP8.

There is compile error, the Mobilenavbar is not a valid any more @using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.SideMenu.MobileNavbar And Default.cshtml @model MobileNavbarViewModel is also not valid

I want to download the source code of LeptonX 5.1.1, but seems the abp list-modules, can don't find LeptonX's module except Lite and BasicTheme.

If I remove the Themes folder. The Login page UI is totally changed (not the customized login in page we used to have)

Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

5 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • Your Themes/LeptonX folder under AuthService is a copy of LeptonX MVC Razor view/component overrides from your old ABP 8 setup. After upgrading to ABP 10, the LeptonX MVC theme package you now reference no longer contains the same MVC component namespaces/types you were overriding (so imports like below break because the underlying type is gone/renamed/moved in newer LeptonX):
    @using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.SideMenu.MobileNavbar
      @model MobileNavbarViewModel
    
    • Do not try to “download LeptonX 5.1.1 source” via abp list-modules. abp list-modules lists ABP modules/templates, not the internal source of the commercial LeptonX MVC theme. Also, the LeptonX MVC theme source is not available through the public GitHub index I can search here, so I can’t provide a verified “download source code for 5.1.1” instruction.

    • The correct fix is:

      1. Remove the outdated copied theme source (AuthService/Themes/LeptonX) or stop compiling it (exclude from project).
      2. Re-apply your login customization using ABP’s supported UI customization approach for ABP 10 + LeptonX, rather than keeping a hard-copied old theme folder that depends on internal component classes.
    • To keep your custom login UI without the old copied theme folder:

      1. Create your own login page override using ABP’s MVC UI customization/overriding mechanisms (Account module UI customization) instead of copying LeptonX internal components.
      2. If you really must override theme components, you need to re-create overrides against the ABP 10 / current LeptonX MVC component names, not the ABP 8 ones. Your current overrides reference old component namespaces (...Components.SideMenu.MobileNavbar) that no longer match.
    • If your goal is exactly “keep the old LeptonX look”, then the only reliable way is to upgrade your copied Razor files to match the new LeptonX MVC API surface. Practically:

      • Start from a fresh ABP 10 microservice template using LeptonX.
      • Compare your old customized login files with the new default login UI and re-apply only the customization pieces (HTML/CSS/branding), not the old component references.
    • About “If I remove Themes folder, Login page UI is totally changed”:

      • That’s expected: you were overriding LeptonX UI by file shadowing. Once removed, ABP falls back to the packaged theme/views of your current ABP 10 setup.

    Links (validated):

    • https://abp.io/docs/latest/ui-themes/lepton-x/mvc
    • https://abp.io/support/questions/4825

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The MobileNavbar component was moved from the SideMenu namespace to the Common namespace starting from LeptonX 4.3 (ABP 9.3). Since you are upgrading directly from ABP 8 to ABP 10, you hit this breaking change.

    To fix the compile error, update the @using directive in your customized Default.cshtml:

    Old (ABP 8 / LeptonX 3.x):

    @using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.SideMenu.MobileNavbar
    

    New (ABP 10 / LeptonX 5.x):

    @using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Themes.LeptonX.Components.Common.MobileNavbar
    

    The @model MobileNavbarViewModel declaration itself is still valid — only the namespace changed.

    Note that the Default.cshtml template also has significant HTML structure changes between LeptonX 3.x and 5.x (the layout of the mobile nav tabs was redesigned), and the MainMenuViewComponent reference was replaced with MobileMainMenuViewComponent. If you are getting layout issues after fixing the compile error, you may need to compare your customized file against the latest LeptonX source and update the HTML structure accordingly.

    Thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Get the LeptonXTheme source code.

    dotnet tool list -g
    Package Id                       Version         Commands         
    ------------------------------------------------------------------
    volo.abp.studio.cli              2.2.4           abp      
    
    abp get-source  Volo.Abp.LeptonXTheme 
    [09:46:59 INF] Downloading source code of Volo.Abp.LeptonXTheme (Latest)
    [09:46:59 INF] Output folder: /Downloads/test
    [09:47:14 INF] Volo.Abp.LeptonXTheme.SourceCode (v: 5.1.1) package downloaded from https://nuget.abp.io/xxx/v3/index.json and saved to (/Users/maliming/.nuget/packages/)
    [09:47:15 INF] 'Volo.Abp.LeptonXTheme' has been successfully downloaded to '/Downloads/test'
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    DominaTang created

    thanks

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    : )

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.