Open Closed

Error after adding Lepton Theme source to project #2399


User avatar
0
dannyb created

I have added the Lepton Theme source to the project as a module, while the project builds I am unable to run it. I have the following error.

  • ABP Framework version: v5.0.1
  • UI type: Angular / MVC / ~~Blazor~~
  • DB provider: ~~EF Core~~ / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered
  • Exception message and stack trace:
3.6461.51\plugins\dpa\DotFiles\JetBrains.DPA.Runner.exe --handle=8656 --backend-pid=36320 --detach-event-name=dpa.detach.8656 C:/SourceControl/Portal/src/Portal.Blazor/bin/Debug/net6.0/Portal.Blazor.exe
[16:00:48 INF] Starting web host.
[16:00:49 INF] User profile is available. Using 'C:\Users\danny\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest.
[16:00:49 INF] Loaded ABP modules:
[16:00:49 INF] - Portal.Blazor.PortalBlazorModule
** Ommited **
[16:00:49 INF]       - Volo.CmsKit.CmsKitProPublicHttpApiClientModule
[16:00:49 INF]     - Volo.Abp.TextTemplateManagement.TextTemplateManagementHttpApiClientModule
[16:00:49 FTL] Application startup exception
Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Portal.Blazor.PortalBlazorModule, Portal.Blazor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: The action 'Volo.Abp.LeptonTheme.ClientProxies.LeptonTheme
SettingsClientProxy.GetAsync (Volo.Abp.LeptonTheme.Management.HttpApi.Client)' has ApiExplorer enabled, but is using conventional routing. Only actions which use attribute routing support ApiExplorer.. See the inner exception for details.
 ---> System.InvalidOperationException: The action 'Volo.Abp.LeptonTheme.ClientProxies.LeptonThemeSettingsClientProxy.GetAsync (Volo.Abp.LeptonTheme.Management.HttpApi.Client)' has ApiExplorer enabled, but is using conventional routing. Only actions which use attribute routing support ApiExplorer.
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorBuilder.AddApiExplorerInfo(ControllerActionDescriptor actionDescriptor, ApplicationModel application, ControllerModel controller, ActionModel action)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorBuilder.CreateActionDescriptor(ApplicationModel application, ControllerModel controller, ActionModel action, SelectorModel selector)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModelFactory.Flatten[TResult](ApplicationModel application, Func`5 flattener)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorBuilder.Build(ApplicationModel application)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.GetDescriptors()
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.UpdateCollection()
   at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.Initialize()
   at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.<>c__DisplayClass11_0.<Subscribe>b__0()
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.Subscribe()
   at Microsoft.AspNetCore.Mvc.Routing.ControllerActionEndpointDataSource..ctor(ControllerActionEndpointDataSourceIdProvider dataSourceIdProvider, IActionDescriptorCollectionProvider actions, ActionEndpointFactory endpointFactory, OrderedEndpointsSequenceProvider orderSequence)
   at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints)
   at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, String name, String pattern, Object defaults, Object constraints, Object dataTokens)
   at Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule.<>c.<ConfigureServices>b__1_10(EndpointRouteBuilderContext endpointContext)
   at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.<>c__DisplayClass0_0.<UseConfiguredEndpoints>b__0(IEndpointRouteBuilder endpoints)
   at Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action`1 configure)
   at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.UseConfiguredEndpoints(IApplicationBuilder app, Action`1 additionalConfigurationAction)
   at Portal.Blazor.PortalBlazorModule.OnApplicationInitialization(ApplicationInitializationContext context) in C:\\src\Portal.Blazor\PortalBlazorModule.cs:line 360
   at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
   at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
   --- End of inner exception stack trace ---
   at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
   at Volo.Abp.AbpApplicationBase.InitializeModules()
   at Volo.Abp.AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
   at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplication(IApplicationBuilder app)
   at Portal.Blazor.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in C:\\src\Portal.Blazor\Startup.cs:line 16
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.&lt;&gt;c__DisplayClass4_0.&lt;Build&gt;b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.&lt;&gt;c__DisplayClass15_0.&lt;UseStartup&gt;b__1(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.HostFilteringStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Portal.Blazor.Program.Main(String[] args) in C:\\src\Portal.Blazor\Program.cs:line 32
[16:00:49 FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Portal.Blazor.PortalBlazorModule, Portal.Blazor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: The action 'Volo.Abp.LeptonTheme.ClientProxies.LeptonTheme
SettingsClientProxy.GetAsync (Volo.Abp.LeptonTheme.Management.HttpApi.Client)' has ApiExplorer enabled, but is using conventional routing. Only actions which use attribute routing support ApiExplorer.. See the inner exception for details.
 ---> System.InvalidOperationException: The action 'Volo.Abp.LeptonTheme.ClientProxies.LeptonThemeSettingsClientProxy.GetAsync (Volo.Abp.LeptonTheme.Management.HttpApi.Client)' has ApiExplorer enabled, but is using conventional routing. Only actions which use attribute routing support ApiExplorer.
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorBuilder.AddApiExplorerInfo(ControllerActionDescriptor actionDescriptor, ApplicationModel application, ControllerModel controller, ActionModel action)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorBuilder.CreateActionDescriptor(ApplicationModel application, ControllerModel controller, ActionModel action, SelectorModel selector)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ApplicationModelFactory.Flatten[TResult](ApplicationModel application, Func`5 flattener)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorBuilder.Build(ApplicationModel application)
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.GetDescriptors()
   at Microsoft.AspNetCore.Mvc.ApplicationModels.ControllerActionDescriptorProvider.OnProvidersExecuting(ActionDescriptorProviderContext context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.UpdateCollection()
   at Microsoft.AspNetCore.Mvc.Infrastructure.DefaultActionDescriptorCollectionProvider.Initialize()
   at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.<>c__DisplayClass11_0.<Subscribe>b__0()
   at Microsoft.Extensions.Primitives.ChangeToken.OnChange(Func`1 changeTokenProducer, Action changeTokenConsumer)
   at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointDataSourceBase.Subscribe()
   at Microsoft.AspNetCore.Mvc.Routing.ControllerActionEndpointDataSource..ctor(ControllerActionEndpointDataSourceIdProvider dataSourceIdProvider, IActionDescriptorCollectionProvider actions, ActionEndpointFactory endpointFactory, OrderedEndpointsSequenceProvider orderSequence)
   at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.GetOrCreateDataSource(IEndpointRouteBuilder endpoints)
   at Microsoft.AspNetCore.Builder.ControllerEndpointRouteBuilderExtensions.MapControllerRoute(IEndpointRouteBuilder endpoints, String name, String pattern, Object defaults, Object constraints, Object dataTokens)
   at Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule.&lt;&gt;c.&lt;ConfigureServices&gt;b__1_10(EndpointRouteBuilderContext endpointContext)
   at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.&lt;&gt;c__DisplayClass0_0.&lt;UseConfiguredEndpoints&gt;b__0(IEndpointRouteBuilder endpoints)
   at Microsoft.AspNetCore.Builder.EndpointRoutingApplicationBuilderExtensions.UseEndpoints(IApplicationBuilder builder, Action`1 configure)
   at Microsoft.AspNetCore.Builder.AbpAspNetCoreApplicationBuilderExtensions.UseConfiguredEndpoints(IApplicationBuilder app, Action`1 additionalConfigurationAction)
   at Portal.Blazor.PortalBlazorModule.OnApplicationInitialization(ApplicationInitializationContext context) in C:\\src\Portal.Blazor\PortalBlazorModule.cs:line 360
   at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.Initialize(ApplicationInitializationContext context, IAbpModule module)
   at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
   --- End of inner exception stack trace ---
   at Volo.Abp.Modularity.ModuleManager.InitializeModules(ApplicationInitializationContext context)
   at Volo.Abp.AbpApplicationBase.InitializeModules()
   at Volo.Abp.AbpApplicationWithExternalServiceProvider.Initialize(IServiceProvider serviceProvider)
   at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplication(IApplicationBuilder app)
   at Portal.Blazor.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in C:\\src\Portal.Blazor\Startup.cs:line 16
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
   at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
   at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
   at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
   at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Portal.Blazor.Program.Main(String[] args) in C:\src\Portal.Blazor\Program.cs:line 32


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Add below to Volo.Abp.LeptonTheme.Management.HttpApi.Client.csproj

      <ItemGroup>
        <EmbeddedResource Include="**\*generate-proxy.json" />
        <Content Remove="**\*generate-proxy.json" />
      </ItemGroup>
    
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    https://support.abp.io/QA/Questions/2336/Unmodified-ABP-Generated-Solution-with-FileManagement-throws-error-on-load

  • User Avatar
    0
    dannyb created

    https://support.abp.io/QA/Questions/2336/Unmodified-ABP-Generated-Solution-with-FileManagement-throws-error-on-load

    Thank you. Will add the fix and report back/close if resolved.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We will release the new version soon.

  • User Avatar
    0
    dannyb created

    We will release the new version soon.

    Sorry, I am getting an error still. But when trying to publish the project.

    Severity	Code	Description	Project	File	Line	Suppression State
    Error		Found multiple publish output files with the same relative path: C:\src\modules\Volo.LeptonTheme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\package.json, C:\src\src\SupplierPortal.Blazor\package.json.	SupplierPortal.Blazor		0	
    
    
  • User Avatar
    0
    dannyb created

    We will release the new version soon.

    Sorry, I am getting an error still. But when trying to publish the project.

    Severity	Code	Description	Project	File	Line	Suppression State 
    Error		Found multiple publish output files with the same relative path: C:\src\modules\Volo.LeptonTheme\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton\package.json, C:\src\src\SupplierPortal.Blazor\package.json.	SupplierPortal.Blazor		0	 
     
    

    Solution found here.

    https://stackoverflow.com/a/69919694

    The issue raises after .NET 6 migration. There's a new feature that blocks multiple files from being copied to the same target directory with the same file name. See https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/duplicate-files-in-output

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