Skip to content

Instantly share code, notes, and snippets.

@teyc
Created September 5, 2015 11:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teyc/1a8a5ce733f4e427027a to your computer and use it in GitHub Desktop.
Save teyc/1a8a5ce733f4e427027a to your computer and use it in GitHub Desktop.
DotNet CoreCLR dnxcore50 on OS X console
{
"version": "1.0.0",
"dependencies": {
},
"frameworks": {
"dnxcore50": {
"dependencies": {
"System.Runtime": "4.0.0-beta-*"
}
}
}
}
namespace CLibrary
{
public class Sample
{
public string OperatingSystem
{
get
{
return "OS X";
}
}
}
}
namespace ConsoleTest
{
using System;
using CLibrary;
public class Program
{
public static void Main()
{
var os = new Sample().OperatingSystem;
System.Console.Out.WriteLine("Hello " + os);
}
}
}
{
"version": "1.0.0-*",
"dependencies": {
"CLibrary": ""
},
"frameworks": {
"dnxcore50": {
"dependencies": {
"System.Console": "4.0.0-beta-22231"
}
}
}
}
{
"projects": [
"CLibrary",
"ConsoleTest"
]
}
all:
dnu restore
dnu build CLibrary --out bin/
dnu build ConsoleTest --out bin/
dnx bin/Debug/dnxcore50/ConsoleTest.dll
clean:
rm -rf bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment