Core: Problem deploy apps on Raspberry

Created on 29 Apr 2018  路  9Comments  路  Source: dotnet/core

I've tried to deploy and run an app on a Raspberry Pi 3 B device. I've followed the install instruction and create an Emtpy .net core Web App (Hello world). I've ran "dotnet publish . -r linux-arm" and copied the release to the Rapberry device.

After I made the program file executeable and execute it, I got the following error message:

Error:
An assembly specified in the application dependencies manifest (FooBar.deps.json) was not found:
package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'

Most helpful comment

Agreed. We have unify build/publish in our backlog.

All 9 comments

Can you try a simple console helloworld application? My guess is that you don't have the ASP.NET Core Runtime installed that matches the build you are targeting.

The same problem with a helloworld application.

pi@DotNetPi : ~ $ cd linux-arm/
pi@DotNetPi: ~/linux-arm $ ls
HelloWorld HelloWorld.pdb libhostfxr.so
HelloWorld.deps.json HelloWorld.runtimeconfig.dev.json libhostpolicy.so
HelloWorld.dll HelloWorld.runtimeconfig.json publish
pi@DotNetPi:~/linux-arm $ sudo chmod 755 HelloWorld
pi@DotNetPi:~/linux-arm $ ./HelloWorld
Error:
An assembly specified in the application dependencies manifest (HelloWorld.deps.json) was not found:
package: 'runtime.linux-arm.Microsoft.NETCore.App', version: '2.0.0'
path: 'runtimes/linux-arm/lib/netcoreapp2.0/Microsoft.CSharp.dll'

That error tells me that you are not running dotnet publish -r linux-arm to create the application or that you are not copying the app from the output folder of that app. Can you confirm?

I created the project on my Mac (with VisualStudio Community, Consoleapplication .NET Core). Then I ran the command dotnet publish -r linux-arm -c Release. Then I copied the whole folder linux-arm, which is in the path HelloWorld/bin/Release/netcoreapp2.0/linux-arm, to the Raspberry.

There should be a publish folder under there that is what you need to use.

Omg. Ok. It works. Tanks for your help!

This is one of the places where people get confused a lot and something I'm hoping we can address in a future update. @livarcocc @KathleenDollard

Agreed. We have unify build/publish in our backlog.

Agreed.

@Marcel-B if you blog your experience, helping people around pitfalls, let us know.

Was this page helpful?
0 / 5 - 0 ratings