【问题标题】:Error in running ASP.Net Web App on ARM processor (Raspberry Pi 3 B) / Ubuntu (Natively without Mono)在 ARM 处理器(Raspberry Pi 3 B)/Ubuntu(本机没有 Mono)上运行 ASP.Net Web 应用程序时出错
【发布时间】:2017-02-05 16:23:57
【问题描述】:

我按照下面的指南在我的 ubuntu 机器上运行了一个简单的C# 控制台程序,一切都很顺利。 (我正在尝试原生使用.Net Core 运行所有内容,而不使用Mono!)

指南: https://github.com/dotnet/core/blob/master/samples/RaspberryPiInstructions.md

但是当我这样做时,尝试运行ASP.Net web application(Visual Studio 生成的非常基本和简单的模板),我得到了这个错误:

root@dotnet:/dotnet/aspnetcore/PublishOutput# /dotnet/dotnet WebApplication1.dll

Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'System.ComponentModel.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider.CreateFileWatcher(String root)
   at Microsoft.AspNetCore.Hosting.Internal.HostingEnvironmentExtensions.Initialize(IHostingEnvironment hostingEnvironment, String applicationName, String contentRootPath, WebHostOptions options)
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.BuildHostingServices()
   at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
   at WebApplication1.Program.Main(String[] args)
Aborted (core dumped)

谁能帮我解决这个问题并在我的 RPi3 上本地运行 ASP.Net 应用程序?

附:我认为这并不重要,但我在 Docker 容器中工作。

【问题讨论】:

  • dotnet GitHub page上似乎有这个问题
  • @TomKuijsten 好的,那么我必须等待 MS 的解决方案。谢谢
  • @TomKuijsten 如果您有兴趣,请查看我的回答。

标签: c# asp.net .net raspberry-pi .net-core


【解决方案1】:

GitHub 上有人找到了解决方案!!非常感谢他。实际上这是一种解决方法,直到我们可以直接在 ARM 上构建应用程序或找到另一个真正的解决方案,但这种解决方法现在非常有效!

https://github.com/dotnet/coreclr/issues/9168#issuecomment-277846829

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-24
    • 1970-01-01
    • 2022-01-16
    • 2020-09-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多