【发布时间】: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