Installing Mono in Bash on Windows 10

Wednesday, 19 October 2016

I was working on a pull request to add a feature to Cake, which includes bootstrapper scripts written in PowerShell and in Bash. Ideally my PR would include changes for both scripts to keep them in feature parity. I could create a VM and install a flavour of Linux
to test out the Bash shell script. But then I remembered that since the July 2016 update, Windows 10 now has an optional Linux Subsystem, which includes a 'native' Bash shell.

Enable Developer Mode and Bash

So first off, let's get the subsystem installed and up to date. You could do this manually through Windows Settings, but I love scripting things where possible. From an elevated PowerShell prompt:

$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
if (-not(Test-Path -Path $RegistryKeyPath)) {
    New-Item -Path $RegistryKeyPath -ItemType Directory -Force

# Add registry value to enable Developer Mode
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1

Restart Windows, then open an elevated PowerShell prompt again:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Reboot again.

Now, type in 'Bash' and launch the Bash shell. The first time, you'll be prompted to enter a separate username/password. It's a good idea to make sure all the components are current.

Run the following to download and install any package updates:

sudo apt-get upgrade

Installing Mono

Cake currently uses Mono when run on Linux or MacOS (apparently .NET Core support is in the works). There's one trick regarding Mono running in Bash on Windows 10 - the build that works correctly is 4.2.4 (See the discussion on this Github issue

First up, add the key for the Mono project:

sudo apt-key adv --keyserver hkp:// --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

And now download and install Mono 4.2.4 and related tools:

sudo sh -c 'echo "deb wheezy/snapshots/4.2.4 main">>/etc/apt/sources.list.d/mono-xamarin.list;apt-get -qq update;apt-get -qq install git gcc mono-complete'

I found after this, this easiest thing was to exit Bash and then open it again. Now I could use Cake's script which could successfully use Mono to run nuget.exe and cake.exe!

DDD Melbourne 2016

Saturday, 20 August 2016

Sign for Monash UniversityLast weekend I was privileged to be able to attend my second DDD Melbourne conference. I flew over Friday afternoon and had an uneventful transit from Melbourne airport to the motel, via the Skybus and a train connection. I stayed locally near Monash University’s Caufield campus, the venue for this year’s event.

Welcome and intro to DDD Melbourne

Around 350 people were there. Monash was a great venue, with all lecture theatres having excellent AV facilities, so no problems watching presentations or hearing speakers. It was also really nice to catch up with a few familiar faces.

Paul Fenwick with slide of 1970's sci fi robotsThe day started with a thought-provoking keynote from Paul Fenwick, making us stop and think about what kind of future we’re creating. That slide with the strange robots – I had that book as a child! Smile
Morning tea break

After that I caught the following sessions:

Lunch break

After lunch I also got to present 10 tools and libraries to enhance .NET Unit Testing.

Audience before closing presentationThe final talk for the day was from Shawn Wildermuth. An inspiring and personal look into the life of a developer, and a great way to end the day.

Shawn talking about active listeningOne key point Shawn made was how critical it is if you want to be a good developer, is to really work in your listening skills – not just “hearing” but actual ‘active listening’, because as it turns out, good communication skills are more important that good technical skills.


And with that DDD Melbourne was over for another year. Off to the airport for the flight back home late Saturday night to be back at home with family and my own bed.

NDC Sydney 2016 Reflections

Tuesday, 9 August 2016

Now that I’m home again, it’s a good opportunity to think back over the last week. What were the highlights, lowlights of attending the first NDC conference held in the southern hemisphere?


WOW!. I had a great time, learned a lot, really enjoyed the sessions as well as meeting and chatting to lots of other developers. I’ll say it again.. WOW Smile

Depth of speakers

Scott Hanselman's opening keynoteThere were a lot of “big name” international speakers. I was going to name some, but that’s not really fair. Go have a look at the list.

That is definitely a plus. You don’t get many opportunities to see these people in Australia, let alone all in the one place. And not to mention the quality local talent.

A nice variety of presentations, and a chance to talk to all these people (and in my case asking “would you be interested in doing a Skype talk to our user group in Adelaide?”, to which the answer was almost always “yeah, sure I’d love to do that”.

The other nice thing is that even though you might regard some of them as having “celebrity” status in the software development (or even just the Microsoft software development) realm, the reality is that I didn’t find anyone who was so caught up in their own ‘fame’. They’re just regular people – they only have walk outside the conference to get a reality check if there was any doubt. No one walking past would have any clue who they were Smile


Sydney Hilton was excellent. Great rooms, helpful staff, yummy food. Full marks.


Rain on the windowIt was wet. I guess that’s the risk of holding a conference in early August – you’re going to catch a bit of Wintery weather sometimes. Not an issue for the conference itself, but maybe a little disappointing for foreign speakers who were hoping to do a bit of sight seeing during their visit.

Common trends and themes

There wasn’t a specific theme for the conference, but I did notice some topics that came up a few times in the presentations. In particular some that stood out to me were:

Volunteer crew

Volunteers at the registration deskIt is quite an easy job –

For doing this you get to attend the conference and participate in all the activities for free (and get a couple of bright green ‘CREW’ t-shirts).

Voting slipsThere weren’t enough volunteers (a few apparently failed to turn up), which meant extra shifts for the rest of us. Hopefully next time there are enough so that everyone gets a fair share of shifts and free sessions.

Session recordings

In the next few weeks, expect to see all of the sessions uploaded to Vimeo at

Next year

The dates have already been announced - 14-18th August, 2017. Mark your diary, talk to your boss, manager, colleagues, social secretary and/or spouse. This is THE developer event in Australia.

I hope to be there again next year, and I hope you will be too!

NDC Sydney–Day 3

Saturday, 6 August 2016

Friday, the final day of NDC Sydney. I was rostered in Room 2 all day, so got to see these speakers/presentations:

And then a late flight home to Adelaide Friday night.

NDC Sydney–Day 2

Thursday, 4 August 2016

Thursday sees me spending rostered the entire day in room 1. This was actually my preference, as the majority of the talks were already on my wish list. One slightly ‘down’ side of doing room 1 is that the bigger crowds mean counting much larger numbers of eval votes after each session.

The evening finished off with a hilarious talk from Assoc. Prof. James Mickens, followed by a social evening of food and drinks in the hotel bar – a good chance to meet and chat with other attendees.

One more day to go!