Open Closed

Plug in base migration #3353


User avatar
0
kapil created
  • ABP Framework version: v5.2.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

If i add module as plugin in project then how can i do migration of that module? I Reference: https://docs.abp.io/en/abp/latest/PlugIn-Modules


23 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Can you check this: https://docs.abp.io/en/abp/latest/PlugIn-Modules#database-schema

  • User Avatar
    0
    kapil created

    any example for migration in plugin base project?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Sorry,we have no such example yet.

  • User Avatar
    0
    kapil created

    ok thanks.

  • User Avatar
    0
    kapil created

    i make one module and give as plugin in project but its throw error.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Can you share the logs and steps? thanks

  • User Avatar
    0
    kapil created

    i put the all dll of my module and give as plugin in project. log file:->

    dll folder which is given as plugin:-

    and WebModule File of project:-

  • User Avatar
    0
    kapil created

    Any Updates??

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I have checked, and this is a known limit. you need to copy all DLL dependencies to the plug-in folder.

    See: https://docs.abp.io/en/abp/latest/PlugIn-Modules#library-dependencies

    And Microsoft document: https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support#plugin-with-library-dependencies

  • User Avatar
    0
    kapil created

    i put all dependencies in plugin folder but its throw error:

    Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module SglCreateBaseProject.Web.SglCreateBaseProjectWebModule, SglCreateBaseProject.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> Volo.Abp.AbpInitializationException: An error occurred during ConfigureServices phase of the module Volo.Abp.AspNetCore.AbpAspNetCoreModule, Volo.Abp.AspNetCore, Version=5.2.1.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---> System.Exception: An object accessor is registered before for type: Microsoft.AspNetCore.Builder.IApplicationBuilder, Microsoft.AspNetCore.Http.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 at Microsoft.Extensions.DependencyInjection.ServiceCollectionObjectAccessorExtensions.AddObjectAccessor[T](IServiceCollection services, ObjectAccessor1 accessor) at Volo.Abp.AspNetCore.AbpAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServices() --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServices() at Volo.Abp.AbpApplicationFactory.Create[TStartupModule](IServiceCollection services, Action1 optionsAction) at SglCreateBaseProject.Web.SglCreateBaseProjectWebModule.ConfigureSwaggerServices(IServiceCollection services) in D:\Module_Project\Create Base Project\SglCreateBaseProject\src\SglCreateBaseProject.Web\SglCreateBaseProjectWebModule.cs:line 224 at SglCreateBaseProject.Web.SglCreateBaseProjectWebModule.ConfigureServices(ServiceConfigurationContext context) in D:\Module_Project\Create Base Project\SglCreateBaseProject\src\SglCreateBaseProject.Web\SglCreateBaseProjectWebModule.cs:line 104 at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() --- End of inner exception stack trace --- at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction) at SglCreateBaseProject.Web.Program.Main(String[] args) in D:\Module_Project\Create Base Project\SglCreateBaseProject\src\SglCreateBaseProject.Web\Program.cs:line 39

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Is the SGLNamedData.Web.dll a class library or startup module?

  • User Avatar
    0
    kapil created

    its module project...there is SGLNamedData.Web is module project

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    ok, Can you share a project that reproduces the problem? liming.ma@volosoft.com

  • User Avatar
    0
    kapil created

    in SGLNamedData module there is only one crud operation and i use this module as Plugin in another project.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    https://support.abp.io/QA/Questions/3353#answer-ae03b935-63f4-5f6d-781b-3a04da5fdf2a

  • User Avatar
    0
    kapil created

    this issue solved..... i added this line to Program.cs file

    await builder.AddApplicationAsync<SglCreateBaseProjectWebModule>(options => { options.PlugInSources.Add(new FolderPlugInSource(@"D:\Module_Project\Create Base Project\SglCreateBaseProject\src\SglCreateBaseProject.Web\wwwroot\DLL")); });

  • User Avatar
    0
    kapil created

    but when i run project all api working fine in swagger. but in frontend these is not working and throw following error.

    2022-07-04 13:07:47.013 +05:30 [INF] Executing endpoint '/NamedDatas/CreateModal' 2022-07-04 13:07:47.013 +05:30 [INF] Route matched with {page = "/NamedDatas/CreateModal", area = "", action = "", controller = ""}. Executing page /NamedDatas/CreateModal 2022-07-04 13:07:47.013 +05:30 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2022-07-04 13:07:47.033 +05:30 [INF] Executing handler method SGLNamedData.Web.Pages.NamedDatas.CreateModalModel.OnPostAsync - ModelState is "Valid" 2022-07-04 13:07:47.048 +05:30 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

    2022-07-04 13:07:47.048 +05:30 [ERR] Remote service 'SGLNamedData' was not found and there is no default configuration. Volo.Abp.AbpException: Remote service 'SGLNamedData' was not found and there is no default configuration. at Volo.Abp.Http.Client.RemoteServiceConfigurationDictionary.GetConfigurationOrDefault(String name) at Volo.Abp.Http.Client.RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync(String name) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.GetActionApiDescriptionModel(IAbpMethodInvocation invocation) at Volo.Abp.Http.Client.DynamicProxying.DynamicHttpProxyInterceptor1.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.InterceptSynchronousResult[TResult](AsyncInterceptorBase me, IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.DynamicProxy.AbstractInvocation.ProceedInfo.Invoke() at Castle.DynamicProxy.AsyncInterceptorBase.ProceedSynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) --- End of stack trace from previous location --- at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.InterceptSynchronousResult[TResult](AsyncInterceptorBase me, IInvocation invocation) at Castle.DynamicProxy.AbstractInvocation.Proceed() at Castle.Proxies.INamedDataAppServiceProxy.CheckNamedDataTitleExists(String Title, Guid Id) at SGLNamedData.Web.Pages.NamedDatas.CreateModalModel.OnPostAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() 2022-07-04 13:07:47.049 +05:30 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Check the document.

    https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients

    And the existing module. https://github.com/abpframework/abp/tree/dev/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity

    https://github.com/abpframework/abp/tree/dev/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo/Abp/Identity

  • User Avatar
    0
    kapil created

    Can i Use AutoApiController in Module Project?

    https://docs.abp.io/en/abp/latest/API/Auto-API-Controllers

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I recommend you add controllers manually just like https://github.com/abpframework/abp/tree/dev/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity

  • User Avatar
    0
    kapil created

    e

    In Proxy i get all the api from module project. and its working in swagger but not in frontend

  • User Avatar
    0
    kapil created

    I recommend you add controllers manually just like https://github.com/abpframework/abp/tree/dev/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo/Abp/Identity

    but i am using AutoApiController in module project.that can be affect?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Don't use the AutoApiController in the module project, Add controllers manually

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35