question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Self-contained applications in Linux does not work

See original GitHub issue

Steps to reproduce

  • mkdir hwapp
  • cd hwapp
  • dotnet new
  • Modify project.json to match self-contained app
{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true
  },
  "dependencies": {
    "Microsoft.NETCore.App": "1.0.0-rc2-3002702"
  },
  "frameworks": {
    "netcoreapp1.0": {}
  },
  "runtimes": {
    "ubuntu.14.04-x64: {}
  }
}
  • dotnet restore
  • dotnet publish -o out
  • cd out
  • hwapp

Expected behavior

Print Hello World!

Actual behavior

hwapp: command not found

Environment data

.NET Command Line Tools (1.0.0-preview1-002702)

Product Information:
 Version:     1.0.0-preview1-002702
 Commit Sha:  6cde21225e

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  14.04
 OS Platform: Linux
 RID:         ubuntu.14.04-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:27 (8 by maintainers)

github_iconTop GitHub Comments

73reactions
dejfczcommented, Feb 25, 2017

For anyone still running into this, try

apt-get install libunwind8

18reactions
code4cloudscommented, Sep 25, 2017

It solves the problem, but not the real issue. The application is not self-contained if it depends on a workaround. A self-contain application should run using just the kernel (i.e. Go with Docker scratch image).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Self-contained applications in Linux does not work #6325
A workaround is creating a container (Fedora/Ubuntu/etc) and run my .net core app inside it, but it's quite indirect. What's the correct way...
Read more >
Running a self-contained ASP.NET Core application on ...
Publish your application as a self contained application: dotnet publish -c release -r ubuntu. · Copy the publish folder to the Ubuntu machine....
Read more >
Self-Contained Applications: Great Tool in .NET 8
NET runtime. It's a great tool for any Windows Developer's tool belt, and definitely worth experimenting with, but you may come across some ......
Read more >
NET application publishing overview
Publishing an app as self-contained includes the .NET runtime with the app, and users of the app don't have to worry about installing...
Read more >
Create a single file for application deployment - .NET
Single-file deployment is available for both the framework-dependent deployment model and self-contained applications.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found