No accessible constructors were found for the type‘XXXXXX‘

abp框架新建了一个模版项目,启动报错。

//报错实例
Autofac.Core.Activators.Reflection.NoConstructorsFoundException:“No accessible constructors were found for the type 'weigu.Admin.Order.OrderHuizongAppService'.

报错意思是没有为’ weight.admin.order.orderhuizongappservice '类型找到可访问的构造函数。"

我的构造函数如下列所示:

  protected OrderHuizongAppService(IRepository<OrderEntity, Guid> repository) : base(repository)
        {

        }

原来是访问级别受到了限制,修改protected 位为public后可以正常访问了

No accessible constructors were found for the type‘XXXXXX‘_第1张图片

你可能感兴趣的:(C#,adb,c#)