-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.net6中报错 #278
Comments
builder.Host.UseServiceProviderFactory(new DynamicProxyServiceProviderFactory()); |
异常信息:IL 变量在当前本机 IP 上不可用。 (异常来自 HRESULT:0x80131304). The error code is CORDBG_E_IL_VAR_NOT_AVAILABLE, or0x80131304.
`using AspectCore.Configuration;
using AspectCore.Extensions.DependencyInjection;
using WebApplication1;
var builder = WebApplication
.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
//仅增加了一行代码。
builder.Services.BuildDynamicProxyProvider();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();`
The text was updated successfully, but these errors were encountered: