Search code examples
asp.net-core.net-coreraspberry-pi3ubuntu-server

Dotnet core web project in Raspberry Pi


I have installed dotnet core on my Raspberry PI running Ubuntu Server 16.04 as per https://github.com/dotnet/core/blob/RaspberryPi/samples/ARMInstructions.md

I create and publish dotnet core project on Linux Mint 18 running dotnet core version 1.0.0-preview2-1-003177. (Also modifying runtimeconfig.json file to update the version to 1.2.0-beta-001206-00). I then copy the published application into the Raspberry pi and run the dll.

For console application it works fine.

But when I repeat the steps for a web project and run it I get below error

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 WebApplication.Program.Main(String[] args) in /home/Development/aspCoreDemo3/Program.cs:line 14 Aborted


Solution

  • Check out the changes you need to make in the project.json. https://github.com/dotnet/coreclr/issues/9168