Monthly Archives: September 2016

.NET Core – Compiling applications for multiple platforms

Modify project.json

"frameworks": {
  "netcoreapp1.0": {
    "dependencies": {
      "Microsoft.NETCore.App": {
        "version": "1.0.1"
      }
    }
  } 
}
"runtimes": {
     "win10-x64": {},
     "osx.10.10-x64": {},
     "ubuntu.14.04-x64": {}
   }

From the CLI run:

dotnet restore
dotnet build -r win10-x64
dotnet build -r osx.10.10-x64
dotnet build -r ubuntu.14.04-x64

dotnet publish -c release -r win10-x64
dotnet publish -c release -r osx.10.10-x64
dotnet publish -c release -r ubuntu.14.04-x64

Reference: Self-Contained NET Core Applications