runtime: linux-arm runtime store is empty

Publishing a shared-framework app for linux-arm runtime from win-x64 will trim libraries that do not ship with the linux-arm 2.0.0 runtime. The app won’t run on the arm device.

Trimming is explained here and the ASP team strongly suggest the use of the Microsoft.AspNetCore.All to benefit from trimming.

The error output looks strange to me, as it includes x64 and x86 “stuff”, but I can’t interpret it. Fun fact: we don’t use appication insights (it is realllly difficult to opt-out) and the dll is not required anyways. Known workaround: disable trimming.

Steps to reproduce

  • dotnet new web -o foo
  • cd foo
  • dotnet restore -r linux-arm
  • dotnet publish -o deploy
  • copy to the linux-arm device
  • on linux-arm: dotnet foo.dll

Expected behavior

The application starts.

Actual behavior

The app crashes due to missing dlls. Sample output could look like this:

Error:
  An assembly specified in the application dependencies manifest (foo.deps.json) was not found:
    package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
    path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
    aspnetcore-store-2.0.0-linux-x64.xml;aspnetcore-store-2.0.0-osx-x64.xml;aspnetcore-store-2.0.0-win7-x64.xml;aspnetcore-store-2.0.0-win7-x86.xml

Environment data on Developer Machine win10-x64

PS> dotnet --info
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10240
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

Environment data on Target Device linux-arm

# /opt/dotnet/dotnet --info

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

This is a cortex-A7, 32bit, hardfloat. Linux selfmade via buildroot.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 19 (13 by maintainers)

Most upvoted comments

Thanks @natemcmaster ! Using the dotnet-runtime-2.1.1-linux-arm64-asp.net-core (actually 32bit) works perfectly fine on our arm32. This is the first time a “default web app” (with trimming) is running on our device.

What exactly are the benefits of using the pre-built runtime store? Right now, we have one webservice only, so there is no advantage in terms of storage space by sharing the ASP.Net libraries. I can see a difference in update strategy - not relevant for us, because we would update both framework and application, when the device comes back from customers for service. Would you expect performance improvements?

aspnet/Universe#554 is tracking this work now. Closing this one here.