gpt4 book ai didi

c# - 应用程序处于中断模式,aspnet core

转载 作者:行者123 更新时间:2023-12-03 08:56:39 25 4
gpt4 key购买 nike

出现以下错误:

System.TypeLoadException: 'Method 'ConfigureAppConfiguration' in type 'Microsoft.AspNetCore.Hosting.WebHostBuilder' from assembly 'Microsoft.AspNetCore.Hosting, Version=1.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.'

在Program.cs中

public static void Main(string[] args)
{
var host = new WebHostBuilder().UseKestrel().UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration().UseStartup<Startup>().Build();
host.Run();
}

最佳答案

您需要将 Microsoft.AspNetCore.Hosting 作为库包含到 Nuget 的项目中

关于c# - 应用程序处于中断模式,aspnet core,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54827569/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com