简体   繁体   English

无法使用Azure上的框架4.6.1执行dotnet核心站点

[英]failure to execute dotnet core site using framework 4.6.1 on azure

I get this error in the output log file. 我在输出日志文件中收到此错误。 There is also a warning on the project.json file indicating that version >4.3.0 was expected for system.runtime, but the build is getting version 4.0.20.0 project.json文件上还有一个警告,指示system.runtime预计版本> 4.3.0,但构建版本为4.0.20.0

Could not load file or assembly 'System.Runtime` 无法加载文件或程序集'System.Runtime`

I have installed system.runtime using nuget install-package system.runtime. 我已经使用nuget install-package system.runtime. system.runtime install-package system.runtime. system.runtime install-package system.runtime.

My project.json framework section looks like this 我的project.json框架部分看起来像这样

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

The stdout logfile on Azure (obtained via FTP) reads thusly Azure上的stdout日志文件(通过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 provides this wonderfully descriptive assistance :-) Azure提供了这种非常具有描述性的帮助:-)

在此输入图像描述

You are running into a known issue: https://github.com/aspnet/Security/issues/1046 . 您遇到了一个已知问题: https//github.com/aspnet/Security/issues/1046 I talked to the .NET experts, and their response is that this will be fixed in 1.1.1 (which is not too far out). 我和.NET专家交谈过,他们的回答是这将在1.1.1中修复(这不是太远了)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 .NET 4.6.1 上使用 SignalR Core - Using SignalR Core on .NET 4.6.1 Gitlab CI 和 YAML 用于 Dotnet Framework 4.6.1 - Selenium 自动化 - Gitlab CI and YAML for Dotnet Framework 4.6.1 - Selenium Automation dotnet核心中的Azure功能 - Azure Function in dotnet core 如何使用Asp.Net.Identity和Entity Framework 6在Asp.Net Core 2.0 Target Framework 4.6.1中设置身份? - How can I setup identity in Asp.Net Core 2.0 Target Framework 4.6.1 using Asp.Net.Identity and Entity Framework 6? 将 FileStream 与 dotnet 核心一起使用 - Using FileStream with dotnet core asp.net核心目标框架4.6.1发布 - asp.net core target framework 4.6.1 publish SqlConnection 无法在 .NET Core 3.1 上打开,但在 4.6.1 Framework 上成功 - SqlConnection Fails to Open on .NET Core 3.1 but Succeeds on 4.6.1 Framework .net核心中的Azure ServiceBus消息未在.net 4.6.1中解析 - Azure ServiceBus message from .net core does not parse in .net 4.6.1 在带有.NET Core(.NET Standard 1.4和.NET Framework 4.6.1)的System.Net.Http中使用await / async时出现错误? - Bug when using await/async for System.Net.Http with .NET Core (.NET Standard 1.4 and .NET Framework 4.6.1)? .net Core 2.0 - 使用 .NetFramework 4.6.1 而不是目标框架 .netCore 2.0 来恢复包。 软件包可能不完全兼容 - .net Core 2.0 - Package was restored using .NetFramework 4.6.1 instead of target framework .netCore 2.0. The package may not be fully compatible
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM