Hi guys, I ran all tests and almost all failed with the message "Message: Castle.MicroKernel.ComponentNotFoundException : No component for supporting the service Abp.Organizations.OrganizationUnitManager was found". It's a while since I ran tests so I'm not sure what's changed, I was fully expecting some to fail due to changes I have made to core Zero code but this seems to be an entirely different problem. Can anyone point me in the right direction? I am not fully conversant with how the Tests project is put together and in the past I have simply run it and then modified tests to reflect changes to core code and new tests for my own code. Can anyone point me in the right direction?
19 Answer(s)
-
0
Your *TestModule should indirectly depend on AbpZeroCommonModule. In ASP.NET Zero, *TestModule → *ApplicationModule → *CoreModule → AbpZeroCoreModule → AbpZeroCommonModule.
Show the stack trace.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi Aaaron, Thanks for the help. From debugging:
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)\r\n at Castle.MicroKernel.DefaultKernel.Resolve(Type service, IDictionary arguments)\r\n at Castle.Windsor.WindsorContainer.Resolve[T]()\r\n at Abp.Dependency.IocManager.Resolve[T]()\r\n at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver)\r\n at Nuagecare.Migrations.Seed.Host.App.DefaultOrganizationUnitCreator.Create()\r\n at Nuagecare.Migrations.Seed.Host.InitialHostDbBuilder.Create()\r\n at Nuagecare.Migrations.Seed.SeedHelper.SeedHostDb(NuagecareDbContext context)\r\n at Nuagecare.Migrations.Seed.SeedHelper.WithDbContext[TDbContext](IIocResolver iocResolver, Action`1 contextAction)\r\n at Nuagecare.Migrations.Seed.SeedHelper.SeedHostDb(IIocResolver iocResolver)\r\n at Nuagecare.EntityFrameworkCore.NuagecareEntityFrameworkCoreModule.PostInitialize()\r\n at Abp.Modules.AbpModuleManager.<>c.<StartModules>b__15_2(AbpModuleInfo module)\r\n at System.Collections.Generic.List`1.ForEach(Action`1 action)\r\n at Abp.Modules.AbpModuleManager.StartModules()\r\n at Abp.AbpBootstrapper.Initialize()From the test explorer: [attachment=0:1d49vu01]TestProblem.PNG[/attachment:1d49vu01] Again, thanks for your help.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Check that your modules DependsOn those I mentioned.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi Aaron, this is traight from 5.4.1 download:
namespace Nuagecare.Tests { [DependsOn( typeof(NuagecareApplicationModule), typeof(NuagecareEntityFrameworkCoreModule), typeof(AbpTestBaseModule))] public class NuagecareTestModule : AbpModule {Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Do the tests in a fresh download work for you?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi Aaron, I confess to not having tried that. I am working on other stuff right now and because this is not critical I will come back to you after I finish my planned release and get back to you. Thanks for your help so far.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi Aaron,
I'm having a go at this again. No matter how Icomment out the first two depends I seem to be getting problems. can you suggest a way forward?
using Abp.Modules; using Abp.TestBase; using Abp.Zero; using Nuagecare.Test.Base; namespace Nuagecare.Tests { [DependsOn(typeof(NuagecareTestBaseModule), typeof(NuagecareTestModule), typeof(NuagecareApplicationModule), typeof(NuagecareCoreModule), typeof(AbpZeroCoreModule), typeof(AbpZeroCommonModule))] public class NuagecareTestModule : AbpModule { } }Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @bobingham,
NuagecareTestModule should only depend on NuagecareTestBaseModule and NuagecareTestBaseModule should depend on modules below:
- NuagecareApplicationModule
- NuagecareEntityFrameworkCoreModule
- AbpTestBaseModule
Could you check that on your project ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
@ismcagdas, thanks. I now have:
[DependsOn(typeof(NuagecareTestBaseModule))] public class NuagecareTestModule : AbpModule { }and
[DependsOn( typeof(NuagecareApplicationModule), typeof(NuagecareEntityFrameworkCoreModule), typeof(AbpTestBaseModule))] public class NuagecareTestBaseModule : AbpModuleBut I'm getting the following error. I have googled the forum and the github pages but not found this specific error. It may well be a result of a the merge from 5.4.1 to 6.8.0.
Message: System.TypeInitializationException : The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. ---- System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. -------- System.DllNotFoundException : Unable to load DLL 'e_sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
-
0
Thanks @maliming, I now have x86 for both the_ Tests_ and_ Test.Base_ projects. The error is now:
Message: Castle.MicroKernel.ComponentNotFoundException : No component for supporting the service Abp.Organizations.OrganizationUnitManager was foundI'm sure we're getting close!
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
@bobingham
I think we are back to the origin. Can you send your project code to my mailbox? [email protected]
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
The two test projects?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Please send the full project, I need to test it locally.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @maliming, I will just have to run without the test project. Thanks for your help. I have not yet implemented Azure Key Vault and there is too much sensitive information hanging around to pass you the entire project. In addition the project requires a local Mongodb (for audit trails and entity changes) and we also use Azure for files, blobs and simple tables. Setting up the system is not as simple as Zero's instructions. Again, thanks for your help. I may come back to this later but for now there are higher priorities.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
You can also download Zero's Demo project to compare the code and dependencies between modules to confirm your problem.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Yep, that's an option I will take up later tonight when time permits. Again, thanks for your help and suggestions, always a pleasure.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Just to remind you, this issue has been fixed.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
What do you mean this has been fixed? How? Where? I am getting this same error trying to build a console app.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)
