gpt4 book ai didi

c# - 无法在 azure 上使用框架 4.6.1 执行 dotnet core 站点

转载 作者:行者123 更新时间:2023-11-30 18:17:58 25 4
gpt4 key购买 nike

我在输出日志文件中收到此错误。project.json 文件上还有一条警告,指示 system.runtime 的版本应为 >4.3.0,但构建版本为 4.0.20.0

Could not load file or assembly 'System.Runtime`

我已经使用 nuget install-package system.runtime 安装了 system.runtime。

我的 project.json 框架部分如下所示

  "frameworks": {
"net461": {
"dependencies": {
"Ignite.Data": {
"target": "project"
}
},
"frameworkAssemblies": {
"System.Runtime.Serialization": "4.0.0.0"
}
}
},

Azure 上的标准输出日志文件(通过 FTP 获取)如下读取

Application startup exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.AspNetCore.Mvc.Internal.DefaultAssemblyPartDiscoveryProvider.DiscoverAssemblyParts(String entryPointAssemblyName)
at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.GetApplicationPartManager(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.MvcCoreServiceCollectionExtensions.AddMvcCore(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddMvc(IServiceCollection services)
at Microsoft.Extensions.DependencyInjection.MvcServiceCollectionExtensions.AddMvc(IServiceCollection services, Action`1 setupAction)
at Ignite.Startup.ConfigureServices(IServiceCollection services) in C:\Projects\Github\Ignite\Ignite.Web\Startup.cs:line 83
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Hosting environment: Production
Content root path: D:\home\site\wwwroot
Now listening on: http://localhost:1942
Application started. Press Ctrl+C to shut down.

Azure 提供了这种精彩的描述性帮助:-)

enter image description here

最佳答案

您遇到了一个已知问题:https://github.com/aspnet/Security/issues/1046 。我与 .NET 专家交谈过,他们的答复是这个问题将在 1.1.1 中得到修复(距离不太远)。

关于c# - 无法在 azure 上使用框架 4.6.1 执行 dotnet core 站点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42580548/

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