I have a simple hello world type dotnet application that uses the framework dependent architecture. I can get the application to execute when I build the application as a self contained application, but I can’t get it run when it depends on the dotnet-runtime-22 snap. The specific error that I get is:
A fatal error occurred, the required library libhostfxr.so could not be found.
My snapcraft.yaml is:
name: broken
version: "0.1.0"
summary: Broken snap, won't execute
description: |
Try to build a framework dependent app that uses dotnet-runtime-xx
grade: devel
confinement: strict
base: core18
apps:
broken:
command: TagDatabase
environment:
DOTNET_ROOT : $SNAP/dnet
plugs:
dotnet-runtime:
content: dotnet-runtime-22
interface : content
default-provider: dotnet-runtime-22
target: $SNAP/dnet
parts:
broken:
source: ./exec/exec.zip
plugin: dump
stage-packages:
- libicu55
- libunwind8
The plug from my application is connected automatically to the dotnet-runtime-22 slot when the snap is installed, so I think that I have the “default-provider” piece right. I use the --dangerous flag to install the snap.
My understanding is that if I execute “snap run --shell broken”, and then navigate to the $SNAP/dnet directory, the system should have bound the directory from the dotnet snap (slot) to my snap (plug), but I can’t see anything in my directory.
The dotnet slot snap is built using a file like this.
I did take a look into seeing if there were AppArmor or Seccomp issues but it doesn’t look like security is a problem.
Any ideas that you have for things that I could try would be greatly appreciated. I’m quite new to all of this, and Linux in general, so anything at all on how to help debug this would be useful.