Instantly share code, notes, and snippets.

Embed
What would you like to do?
.NET Core Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
$script = <<-SCRIPT
sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
apt-get update
apt-get install dotnet -y
SCRIPT
config.vm.provision "shell", inline: $script
end
@theparticleman

This comment has been minimized.

Owner

theparticleman commented Dec 1, 2015

Once you vagrant up, do a vagrant ssh to ssh in to the VM. Once in, run the following commands:
dotnet new - this sets up a new "Hello World" project
dotnet restore - restores nuget packages
dotnet run - runs the project

You should get an output of "Hello world"

All the info comes from this site: https://dotnet.github.io/getting-started/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment