簡體   English   中英

無法使用Azure上的框架4.6.1執行dotnet核心站點

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

我在輸出日志文件中收到此錯誤。 project.json文件上還有一個警告,指示system.runtime預計版本> 4.3.0,但構建版本為4.0.20.0

無法加載文件或程序集'System.Runtime`

我已經使用nuget install-package system.runtime. system.runtime install-package system.runtime. system.runtime install-package system.runtime.

我的project.json框架部分看起來像這樣

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

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提供了這種非常具有描述性的幫助:-)

在此輸入圖像描述

您遇到了一個已知問題: https//github.com/aspnet/Security/issues/1046 我和.NET專家交談過,他們的回答是這將在1.1.1中修復(這不是太遠了)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM