Cannot resolve CustomRepository
I created new project according to https://docs.abp.io/en/abp/latest/Best-Practices/Repositories. But it do not work. Because it shows error Cannot resolve parameter 'Tester.People.IPersonRepository personRepository' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], Tester.People.IPersonRepository)'.
- ABP Framework version: 5.3.4
- Interface: Blazor
- Database provider: EF Core
- Exception message and stack trace if available (check the logs).
Autofac.Core.DependencyResolutionException : An exception was thrown while activating Castle.Proxies.PeopleServiceProxy.
---- Autofac.Core.DependencyResolutionException : None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Castle.Proxies.PeopleServiceProxy' can be invoked with the available services and parameters:
Cannot resolve parameter 'Tester.People.IPersonRepository personRepository' of constructor 'Void .ctor(Castle.DynamicProxy.IInterceptor[], Tester.People.IPersonRepository)'.
- Steps needed to reproduce the problem.
Run tests
Sample project: tester01.zip
Please help me
I have the same issue. Tried everything https://stackoverflow.com/questions/73768528/dependency-not-injecting-while-using-addrepositories-abp-framework6-0-c-shar
The same
From: Aman Adlakha @.> Sent: Monday, September 19, 2022 12:21:52 PM To: abpframework/abp @.> Cc: Cephas PAD @.>; Mention @.> Subject: Re: [abpframework/abp] Cannot resolve CustomRepository (Issue #13979)
@cephaspadhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcephaspad&data=05%7C01%7C%7C5580948e2759424cb25108da99fedc98%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991617160848201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VAfPxkLHh0PGmdkHVZKDx5rDa1wHMQ8PhGT%2FEW%2BnRhI%3D&reserved=0 Is it working fine in the main repository not in the test one?
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fabpframework%2Fabp%2Fissues%2F13979%23issuecomment-1250582275&data=05%7C01%7C%7C5580948e2759424cb25108da99fedc98%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991617160848201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=YfULzvUDLy%2FpK60auoyEP9PpIqyX%2BURbCvHI8n3HW9g%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFLAWVF5I3EVASKECKKHZQ3V67Z7BANCNFSM6AAAAAAQILPD6I&data=05%7C01%7C%7C5580948e2759424cb25108da99fedc98%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637991617160848201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SSytj7DRjMowseOuPfAa1n6MN9W1rDn3ZBgvkkuJTa8%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>
Rename PersonEfCoreRepository class name to EfCorePersonRepository
Thanks. It works!!!
From: maliming @.> Sent: Sunday, September 25, 2022 2:25:45 PM To: abpframework/abp @.> Cc: Cephas PAD @.>; Mention @.> Subject: Re: [abpframework/abp] Cannot resolve CustomRepository (Issue #13979)
Rename PersonEfCoreRepository class name to EfCorePersonRepository
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fabpframework%2Fabp%2Fissues%2F13979%23issuecomment-1257138220&data=05%7C01%7C%7C82942319ef784d3bb05308da9ec729a8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637996875518992649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0CuMUAxS2OXtq%2F49zgscomcP6WWhJv8ODgTuBXE2Y5Y%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAFLAWVBXEWML33R2LPZMNA3V7747TANCNFSM6AAAAAAQILPD6I&data=05%7C01%7C%7C82942319ef784d3bb05308da9ec729a8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637996875518992649%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yvK95pFaSBEVWNnl6IRgPuzt3IklamD5A2WTtAuTEQM%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>
Can i know the reason why this works?
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: maliming @.> Sent: Sunday, September 25, 2022 12:55:45 PM To: abpframework/abp @.> Cc: Aman Adlakha @.>; Comment @.> Subject: Re: [abpframework/abp] Cannot resolve CustomRepository (Issue #13979)
Rename PersonEfCoreRepository class name to EfCorePersonRepository
— Reply to this email directly, view it on GitHubhttps://github.com/abpframework/abp/issues/13979#issuecomment-1257138220, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY3533YKBRC4CENQQFRKSJ3V7747TANCNFSM6AAAAAAQILPD6I. You are receiving this because you commented.Message ID: @.***>
hi
https://docs.abp.io/en/abp/latest/Dependency-Injection#exposed-services-by-convention
Can i know the reason why this works? Get Outlook for Androidhttps://aka.ms/AAb9ysg … ________________________________ From: maliming @.> Sent: Sunday, September 25, 2022 12:55:45 PM To: abpframework/abp @.> Cc: Aman Adlakha @.>; Comment @.> Subject: Re: [abpframework/abp] Cannot resolve CustomRepository (Issue #13979) Rename PersonEfCoreRepository class name to EfCorePersonRepository — Reply to this email directly, view it on GitHub<#13979 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AY3533YKBRC4CENQQFRKSJ3V7747TANCNFSM6AAAAAAQILPD6I. You are receiving this because you commented.Message ID: @.***>
I don't exactly know the reason. I just rename from PersonEfCoreRepository to EfCorePersonRepository . I've read on @maliming link but none of related was found.
naming convention.
The code will check if class.Name.EndsWith(interfaceName.RemoveLeft('I'))