Skip to content

Instantly share code, notes, and snippets.

Created December 1, 2015 19:47
What would you like to do?
.NET Core Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config| = "ubuntu/trusty64"
$script = <<-SCRIPT
sh -c 'echo "deb [arch=amd64] trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
apt-key adv --keyserver --recv-keys 417A0893
apt-get update
apt-get install dotnet -y
config.vm.provision "shell", inline: $script
Copy link

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:

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