0

I'm attempting to create a standalone executable using dotnet core that will run on Ubuntu 16.10. I've created a simple console application using

dotnet new console

I've then edited the .csproj to include Ubuntu as a RunTimeIdentifier:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp1.1</TargetFramework>
  </PropertyGroup>
<PropertyGroup>
    <RuntimeIdentifiers>ubuntu.16.10-x64</RuntimeIdentifiers>
  </PropertyGroup>
</Project>

Finally, I do the following to build and publish the app: 1) dotnet restore 2) dotnet build 3) dotnet publish -c Release -r Ubuntu.16.10-x64

I then copy the resulting files to my Ubuntu Linux machine, and when I try to execute the app (./SimpleConsole), I get the following:

Error: assembly specified in the dependencies manifest was not found -- package: 'microsoft.codeanalysis.common', version: '1.3.0', path: 'lib/netstandard1.3/Microsoft.CodeAnalysis.dll'

  • what are your package references? – TerribleDev Jun 13 '17 at 22:20
  • Are you sure your linux machine is 16.10 and not 16.04? Also are you copying bin/Release/netcoreapp1.1/ubuntu.16.10-x64/publish/** – TerribleDev Jun 13 '17 at 22:28
  • Thanks for the response, TerribleDev. I don't have any package references, the above is my entire .csproj file. I'm certain that I'm running on 16.10, and yes, I'm copying the entire publish directory. – Jason Peterson Jun 14 '17 at 19:33
  • Possible duplicate of [Running Self-contained ASP .NET core application on Ubuntu](https://stackoverflow.com/questions/40226032/running-self-contained-asp-net-core-application-on-ubuntu) – Harit Kumar Oct 23 '17 at 13:37

0 Answers0