The best practice is creating your folder structure same as ABP is,
I had same problem,
Scan your project for
<ProjectReference Include="C:\SRC\abp-4.4.2\licensing\Volo.Abp.Commercial.Core\Volo.Abp.Commercial.Core.csproj" />
and replace it with <PackageReference Include="Volo.Abp.Commercial.Core" Version="4.2.2"/>
The problem is pro modules generated by Suite by ABP's developers which contains unusable references to SuiteTemplate project,
Scan your project for
<ProjectReference Include="C:\SRC\abp-4.4.2\licensing\Volo.Abp.Commercial.SuiteTemplate\Volo.Abp.Commercial.SuiteTemplate.csproj" />
and replace it via empty.
My bad, missed CmsServiceHttpApiClientModule
DependsOn for web modules
Service's api and gateways works fine but the public site and dashboard has DI error
2021-08-07 14:09:55.305 +04:30 [ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {
"ActivatorChain": "Volo.CmsKit.Admin.Pages.PageAdminController"
},
"validationErrors": null
}
2021-08-07 14:09:55.305 +04:30 [ERR] An exception was thrown while activating Volo.CmsKit.Admin.Pages.PageAdminController.
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.CmsKit.Admin.Pages.PageAdminController.
---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'Volo.CmsKit.Admin.Pages.PageAdminController' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.CmsKit.Admin.Pages.IPageAdminAppService pageAdminAppService' of constructor 'Void .ctor(Volo.CmsKit.Admin.Pages.IPageAdminAppService)'.
at Autofac.Core.Activators.Reflection.ReflectionActivator.GetAllBindings(ConstructorBinder[] availableConstructors, IComponentContext context, IEnumerable`1 parameters)
at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next)
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
--- End of inner exception stack trace ---
at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
at Microsoft.AspNetCore.Mvc.Controllers.ServiceBasedControllerActivator.Create(ControllerContext actionContext)
at Microsoft.AspNetCore.Mvc.Controllers.ControllerFactoryProvider.<>c__DisplayClass5_0.<CreateControllerFactory>g__CreateController|0(ControllerContext controllerContext)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2021-08-07 14:09:55.306 +04:30 [ERR] ---------- Exception Data ----------
ActivatorChain = Volo.CmsKit.Admin.Pages.PageAdminController
@hitaspdotnet sorry but I couldn't reproduce the cms-kit issue.
tested with the following
abp new Mvc.EfCoreTier -t app-pro -u mvc --mobile none --tiered --database-provider ef -csf --preview --with-public-website
abp new Mvc.EfCore -t app-pro -u mvc --mobile none --database-provider ef -csf --preview --with-public-website
Not tiered and the menus has error
@hitaspdotnet
if you have installed cms-kit module, you need to add the following code block into theConfigureServices
of yourBookStoreDomainSharedModule.cs
GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit => { cmsKit.EnableAll(); }); GlobalFeatureManager.Instance.Modules.CmsKitPro(cmsKitPro => { cmsKitPro.EnableAll(); });
then add migration
It's a fresh template using suite with public web site + cmskit options
And the interface ICmsKitProDbContext have not NewsletterRecords prop
Some of entities uses ModuleDbContext instead of using IModuleDbContext https://github.com/abpframework/abp/blob/4495d7a3b1cb6a4aa816f29e2f8e5405ed68a6d5/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Blogs/EfCoreBlogPostRepository.cs#L19
is this fixed? can I close it?
I have this problem too. Using cms-kit in adminService
---> Volo.Abp.AbpException: No configuration found for Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore, Version=5.0.8.0, Culture=neutral, PublicKeyToken=adb9793829ddae60! Use services.Configure<AbpDbContextOptions>(...) to configure it.
any answer?