Skip to content

How to use the dotnet-runtime-xx snap? #640

@philippseith

Description

@philippseith

I installed the dotnet-runtime-30 snap as described in Installation using Snap on Ubuntu 18.04.
Then i copied an app that was published on Windows with dotnet publish -f netcoreapp3.0 -r linux-x64 --self-contained=false to the Ubuntu host.

I found no way to run the executable:

  1. ./myexecutable failed with
    A fatal error occurred. The required library libhostfxr.so could not be found. If this is a self-contained application, that library should exist in [/home/philipp/publish/]. If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].
  2. dotnet-runtime-30.dotnet ./myexecutable failed with
    It was not possible to find any installed .NET Core SDKs Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from: https://aka.ms/dotnet-download
  3. dotnet-runtime-30.dotnet ./myexecutable.dll failed with
    Failed to create CoreCLR, HRESULT: 0x80070008

On the other hand it works when the runtime snap is mounted and dotnet in the mounted filesystem is called with ~/mountpoint/dotnet ./myexecutable.dll or when the sdk snap is used.

Metadata

Metadata

Assignees

Labels

area-SnapquestionAnswer questions and provide assistance, not an issue with source code or documentation.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions