Ends in:
7 DAYS
21 HRS
17 MIN
32 SEC
Ends in:
7 D
21 H
17 M
32 S
Open Closed

[Basic Theme] The type or namespace name 'LeptonX' does not exist #5278


User avatar
0
rashed created
  • ABP Framework version: v7.2.2
  • UI type:ALL
  • DB provider: ALL
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
    1. error CS0234: The type or namespace name 'LeptonX' does not exist in the namespace 'Volo.Abp.AspNetCore.Mvc.UI.Theme' (are you missing an assembly reference?)
    2. error CS0246: The type or namespace name 'AbpAspNet CoreMvcUiLeptonXThemeModule' could not be found (are you missing a using directive or an assembly reference?)
  • Steps to reproduce the issue:"

When trying to create a new project with Basic theme it faild in compiling , as it still generate code depend on LeptonX theme not basic theme .


13 Answer(s)
  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    I just created application with the BasicTheme and couln't reproduce the problem.

    Which application template did you create?

  • User Avatar
    0
    rashed created

    Application Module - Single Layer

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Ok, It seems it's a bug on single-layer module template. I'm creating an internal issue for that and we'll fix it soon.

    You can use the following steps to replace leptonx with basic theme.

    • Replace using statements

      using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX;
      using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Bundling;
      

      with

      using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling;
      using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
      
    • Replace typeof(AbpAspNetCoreMvcUiLeptonXThemeModule), with typeof(AbpAspNetCoreMvcUiBasicThemeModule),

    • Replace the ConfigureBundles() method inside like below:

      private void ConfigureBundles()
      {
          Configure<AbpBundlingOptions>(options =>
          {
              options.StyleBundles.Configure(
                  LeptonXThemeBundles.Styles.Global,
                  bundle =>
                  {
                      bundle.AddFiles("/global-styles.css");
                  }
              );
          });
      }
      
  • User Avatar
    0
    rashed created

    Thank you ensin,

    I already fixed it but wanted to report it to be fixed with next version.

    Note: the issue appear with mvc and angular ( single layer), so some replaces needed in angular folder too

    another issue I notice in angular single layer also

    when you browse the api project and try to login using authorize button ( the green button ) it gives you another error : no ui configured

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    For the angular project, can you share more information? Which button do you refer as 'the green button' maybe you can share a screenshot to help us understand better

  • User Avatar
    0
    rashed created

    Yes sure,

    I mean when you browse the API project

  • User Avatar
    0
    rashed created

    I think the angular project replacment should be in this file

  • User Avatar
    0
    enisn created
    Support Team .NET Developer

    Thanks for your detailed explanation, I'm creating another internal issue for the angular version, we'll fix it in next releases

  • User Avatar
    0
    rashed created

    Hi,

    I try again with 7.3 RC2, but facing more issues here is the command I use to create the project

    abp new MyProject -u angular -dbms SQLite --separate-identity-server --preview --theme basic -csf

    Then wen running andgular project it gives the following issues

    I hope is get fixed brfore the release of 7.3

  • User Avatar
    0
    rashed created

    Also you don't have any option to create free angular template because it use the template name with commercial version, and the only option you have to logout your account useing abp logout to create the free one

    abp new MyProject -u angular -dbms SQLite --separate-identity-server --preview
    
    It should be (for example ) angular-pro for commercial version 
    abp new MyProject -u angular-pro -dbms SQLite --separate-identity-server --preview
    
  • User Avatar
    0
    jfistelmann created

    Also you don't have any option to create free angular template because it use the template name with commercial version, and the only option you have to logout your account useing abp logout to create the free one

    abp new MyProject -u angular -dbms SQLite --separate-identity-server --preview 
     
    It should be (for example ) angular-pro for commercial version  
    abp new MyProject -u angular-pro -dbms SQLite --separate-identity-server --preview 
    

    Hey,

    though maybe a bit irritating, you can specify that with the template parameter:

    Community: (-t | --template -> app)

    abp new MyProject -t app -u angular -dbms SQLite
    

    Sample output:

    ABP CLI 7.2.2
    Creating your project...
    Project name: MyProject
    Template: app
    DBMS: SQLite
    UI Framework: Angular
    Output folder: C:\Repos\abp\support\QA5278
    Using cached template: app, version: 7.2.2
    Theme: LeptonXLite
    Check out the documents at https://docs.abp.io/en/abp/latest/Startup-Templates/Application
    

    Commercial: (-t | --template -> app-pro) *default if logged in as commercial user

    abp new MyProject -t app-pro -u angular -dbms SQLite
    

    Sample output:

    ABP CLI 7.2.2
    Creating your project...
    Project name: MyProject
    Template: app-pro
    DBMS: SQLite
    UI Framework: Angular
    Output folder: C:\Repos\abp\support\qa5278-pro
    Using cached template: app-pro, version: 7.2.2
    Theme: LeptonX
    Theme Style: System
    Check out the documents at https://docs.abp.io/en/commercial/latest
    
  • User Avatar
    0
    rashed created

    @jfistelmann  Thanks for feedback.

    What about the other issue ?

  • User Avatar
    0
    jfistelmann created

    @jfistelmann  Thanks for feedback.

    What about the other issue ?

    I recommend that we track the AbpWindowService issue here: https://support.abp.io/QA/Questions/5298/Compile-error-in-version-73-Preview as it only concentrates on this specific error.

    I'll add a comment there to reference this issue back.

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