abp
abp copied to clipboard
AbpController attribute “ServiceProvider” is NULL
System.ArgumentNullException: Value cannot be null.
Parameter name: provider
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
at Volo.Abp.Application.Services.ApplicationService.LazyGetRequiredService[TService](TService& reference) in D:\github\abp\framework\src\Volo.Abp.Ddd.Application\Volo\Abp\Application\Services\ApplicationService.cs:line 43
at Volo.Abp.Application.Services.CrudAppServiceBase`7.MapToGetOutputDto(TEntity entity) in D:\github\abp\framework\src\Volo.Abp.Ddd.Application\Volo\Abp\Application\Services\CrudAppServiceBase.cs:line 110
at System.Linq.Enumerable.SelectListIterator`2.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Volo.Abp.Application.Services.AsyncCrudAppService`7.GetListAsync(TGetListInput input)
AbpController attribute “ServiceProvider” is NULL
What version of abp are you using? What is the recurring step?
I had this issue a couple of days ago and I had forgotten to put DependsOn[typeof(AbpAutofacModule)] in my module. Just a thought.
Without this property injection isn't possible as it's not supported natively in..Net Core
Yes, the built-in container does not support property injection. We will all use autofac.