问题复现说明:
问题说明:
手动搭建AbpVnext框架,就搭了Web层,配置好WebModule和Program,运行就一直报:An error occurred during ConfigureServices phase of the module Volo.Abp.Data.AbpDataModule, Volo.Abp.Data
解决办法:
var builder = WebApplication.CreateBuilder(args); builder.Services.ReplaceConfiguration(builder.Configuration); // 替换下配置类 builder.Services.AddApplication<FGWebModule>(); var app = builder.Build();
如果你没有配置Autofac的话,此时会报另外一个错误:
InvalidOperationException: Unable to resolve service for type 'Volo.Abp.Http.Modeling.IApiDescriptionModelProvider' while attempting to activate 'Volo.Abp.Http.ProxyScripting.ProxyScriptManager'.
解决办法是:
var builder = WebApplication.CreateBuilder(args); builder.Host.UseAutofac(); //使用Autofac builder.Services.ReplaceConfiguration(builder.Configuration); builder.Services.AddApplication<FGWebModule>(); var app = builder.Build();
标签:Volo,Abp,Services,var,Data,builder From: https://www.cnblogs.com/lzme/p/17497483.html