4

I created project vNext Console Application in Visual Studio. I copied these files to linux machine. And try to run them

ubuntu@ubuntu-Virtual-Machine:~/ConsoleApp2/src/ConsoleApp2$ dnvm list

Active Version              Runtime Architecture OperatingSystem Alias
------ -------              ------- ------------ --------------- -----
  *    1.0.0-rc1-final      coreclr x64          linux           
       1.0.0-rc1-final      mono                 linux/osx       default

ubuntu@ubuntu-Virtual-Machine:~/ConsoleApp2/src/ConsoleApp2$ dnu restore
ubuntu@ubuntu-Virtual-Machine:~/ConsoleApp2/src/ConsoleApp2$ dnx run
ubuntu@ubuntu-Virtual-Machine:~/ConsoleApp2/src/ConsoleApp2$

My application is not running. However if I switch dnvm to mono it works ok. Content of my files is

Program.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    public class Program
    {
        public void Main(string[] args)
        {
            Console.WriteLine("Hello world!!!!");
            Console.Read();
        }
    }
}

project.json

{
  "version": "1.0.0-*",
  "description": "ConsoleApp2 Console Application",
  "authors": [ "Anton" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "dependencies": {

  },

  "frameworks": {
    "dnx451": {},
    "dnxcore50": {
      "dependencies": {

        "System.Console": "4.0.0-beta-23019",
        "System.Linq": "4.0.0-beta-23019",
        "System.Threading": "4.0.10-beta-23019",
        "Microsoft.CSharp": "4.0.0-beta-23019"
      }
    }
  }
}

Why does dnx command write nothing when switched to coreclr?

takayoshi
  • 2,789
  • 5
  • 36
  • 56

1 Answers1

0

Mostly sure you're missing one of the prerequisites. They are listed here:

sudo apt-get install libunwind8 gettext libssl-dev libcurl4-openssl-dev zlib1g libicu-dev uuid-dev
Victor Hurdugaci
  • 28,177
  • 5
  • 87
  • 103