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.

Cannot publish ubuntu-x64 standalone app on windows

See original GitHub issue

Steps to reproduce

  1. Restore packages
  2. PS C:\Source\cli-samples\HelloMvc> dotnet publish -r ubuntu-x64

HelloMVC with the following project.json

{
  "buildOptions": {
    "preserveCompilationContext": true,
    "emitEntryPoint": true,
    "debugType": "portable"
  },
  "publishOptions": {
    "include": [
      "wwwroot",
      "Views"
    ]
  },
  "dependencies": {
    "Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
    "Microsoft.AspNetCore.Mvc": "1.0.0-*",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
    "Microsoft.Extensions.Logging.Console": "1.0.0-*",
    "Microsoft.NETCore.App": {
      "version": "1.0.0-*"
    }
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "portable-net45+wp80+win8+wpa81+dnxcore50",
        "portable-net451+win8"
      ]
    }
  },
  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
      "version": "1.0.0-*",
      "imports": "portable-net45+wp80+win8+wpa81+dnxcore50"
    }
  },
  "scripts": {
    "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
  }, 

  "runtimes": { 
    "ubuntu-x64": {}
  }
}

Expected behavior

Publishing succeeds.

Actual behavior

PS C:\Source\cli-samples\HelloMvc> dotnet publish -r ubuntu-x64
Publishing HelloMvc for .NETCoreApp,Version=v1.0/ubuntu-x64
Project HelloMvc (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling HelloMvc for .NETCoreApp,Version=v1.0

Compilation succeeded.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:01.9402395
Failed to make the following project runnable: HelloMvc (.NETCoreApp,Version=v1.0) reason: Expected coreclr library not found in package graph. Please try running dotnet restore again.
Published 0/1 projects successfully

Environment data

dotnet --info output:

PS C:\Source\cli-samples\HelloMvc> dotnet --info
.NET Command Line Tools (1.0.0-rc2-002655)

Product Information:
 Version:     1.0.0-rc2-002655
 Commit Sha:  3e96a05f9c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
moozzykcommented, May 4, 2016

If I put ubuntu.14.04-x64 in my project.json and use this as the -r value then I don’t get an error. Still the experience sucks - if I use a RID I cannot publish for in my project.json I should get an error/warning (possibly during restore).

1reaction
moozzykcommented, May 4, 2016

How am I supposed to know that I need to use exact RID? My runtime section looks just like this:

  "runtimes": { 
    "ubuntu-x64": {}
  }

so there is no version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run NET 6 app on Ubuntu 22.04 without self ...
I am having trouble running my NET6 application on Ubuntu 22.04 unless I publish my app with --self-contained true.
Read more >
ubuntu - Published .Net-Core App won't run
I published my app for Ubuntu in dotnet 2.1 using this command: dotnet publish -c Release -v ubuntu-x64. I have .net-core run-time on ......
Read more >
NET application publishing overview
Learn about the ways to publish a .NET application. .NET can publish platform-specific or cross-platform apps. You can publish an app as ...
Read more >
Install the .NET SDK or the .NET Runtime on Ubuntu
Demonstrates the various ways to install .NET SDK and .NET Runtime on Ubuntu.
Read more >
Install .NET SDK or .NET Runtime on Ubuntu 22.04
This article discusses how to install .NET on Ubuntu 22.04; .NET 6 and .NET 7 are supported. Install the SDK (which includes the...
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