Preparing for ASP.NET vNext and Visual Studio 2015

Happy Thanksgiving to folks in the USA.

I’ve finally taken the plunge and decided to get stuck into the recently released Release Candidate (RC) of ASP.NET 5.  Prior to today, I’d stuck with the RTM version of Visual Studio 2015 which insulated me from some of the changes which are on the horizon.

A few months ago, I’d managed to put together a working (live) solution using VS 2015 and the new Web Projects, and you can see it here at

Whilst this was handy experience, it barely prepared me for the massive changes to the development environment which ASP.NET 5 RC requires.  This article contains my experiences in getting a Web API project compiled and run when consuming ASP.NET 5 RC packages.

Git Support

Whether you use Github, Team Foundation Server Source Control or no source control, you’ll want Git support in your dev environment anyway.  A lot of PowerShell scripts and commands pull and clone from Git repositories, and command line integration, IMHO is essential.  If you haven’t installed Git support with Visual Studio 2015, now’s the time to do so.

Install Git/GitHub support when you install Visual Studio 2015 (or modify your install)


Also you can download Git tools for Windows from and support for Git in PowerShell here:

Speaking of PowerShell….

Preparing PowerShell

Enable PowerShell script execution.  You’ll probably be working with PowerShell more than you have in the past, even if you aren’t writing the script.  You’ll certainly be using PowerShell commands, at a minimum inside the Package Manager Console inside VS 2015.

Open a PowerShell console as Administrator, then: Set-ExecutionPolicy Unrestricted

If you get the following error when loading the Package Manager Console inside Visual Studio 2015:

“”Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope. Due to the override, your shell will retain its current effective execution policy of Unrestricted. Type “Get-ExecutionPolicy -List” to view your execution policy settings. For more information please see “Get-Help Set-ExecutionPolicy”.”””

Here’s my PowerShell Execution Policy on a Workgroup-based computer:


..and on a Domain-joined machine with a Group Policy Object applied:


It’s likely caused by a Group Policy Object (GPO) which is setting a domain-policy on PowerShell restrictions.  Even if you modify and update group policy, this error condition may persist.  Based on an article here:

A registry hack will get you past this annoying issue:

Windows Registry Editor Version 5.00



Working with DNX, DNU and DNVM

To manage different versions of the .NET Runtime environments, you’ll need to get familiar with dnx (Microsoft .NET Execution environment), dnu (.NET Development Utility) and dnvm (.NET Version Manager).  Screenshots below.  You should be able to execute them from the Visual Studio 2015 Command Line Tool:








If you get the message:

“’dnx’ is not recognized as an internal or external command, operable program or batch file.”

You can fix this issue by running the following command:dnvm use default –p

which will persist the changes to the environment variable for the current user.


On another machine, I was warned about a deprecated environment variable:


Which might beg the question….

What are KRE, KVM, KPM?

In short, KRE/KVM and KPM are management bits for ASP.NET 5.  K-bits were named to DNX/DNVM.  I’m Including this info in case it leads you to this article.

From the link above:

K has three components:

  1. KRE – K Runtime Environment is the code required to bootstrap and run an ASP.NET vNext application. This includes things like the compilation system, SDK tools, and the native CLR hosts.
  2. KVM – K Version Manager is for updating and installing different versions of KRE. KVM is also used to set default KRE version.
  3. KPM – K Package Manager manages packages needed by applications to run. Packages in this context are NuGet packages.

Microsoft ASP.NET and Web Tools 2015 (RC) – Visual Studio 2015

Lastly, before you get too excited, there’s a couple of hundred megabytes of updates you’ll need to the supporting tooling for the RC (RTM differs too much, some important things were renamed since then).

The latest version, naturally, requires updated tooling.  If you only have Visual Studio 2015 RTM, then prepare for some fun.  You can download the RC bits here:

Which leads me to installing all of the following on my Development machine:



The net result is that when I now open Visual Studio 2015, and I create a new project – I select .NET Framework 4.6 and when I create a new ASP.NET Web project, the options include:




Here’s some infuriating error messages you might stumble across in trying to compile a simple Web API…..

“DNX 4.5.1 error NU1002: The dependency <Assembly> in project <Project> does not support framework DNX,Version=v4.5.1.” e.g.

“DNX 4.5.1 error NU1002: The dependency System.Runtime 4.0.0 in project Asp5Api does not support framework DNX,Version=v4.5.1.”


System.IO.FileNotFoundException: Could not load file or assembly ‘Microsoft.DNX.PackageManager’ or one of its dependencies. The system cannot find the file specified.

Means you probably haven’t installed the latest Web Tools.  The PackageManager assembly apparently has been renamed, and is reflected in the later (post-RTM) versions.

Installing a Kodi Media Box

Welcome, Kodi


Earlier this year I wrote about a little unit which packs a surprising punch.  Well, since that time my needs have changed, and I ended up with this unit as surplus to requirements.

Never one to let decent hardware sit idle, I moved it into the kitchen this weekend, to replace an underperforming WDTV unit.  What an improvement!  To remove the WD TV, I needed a decent replacement, and found it with Kodi – a free home theatre software package.


The Installation

The unit comes with a standard VESA backing plate, which also means that it’s a bit useless when the monitor is on a monitor arm.  Not to worry, it mounts just fine onto a wall, or in my case some kitchen cabinetry.

I needed to fit the Brix as close to the wall as I could to give the monitor space, this caused some issues for the inflexible HDMI cable which needs to go inconveniently into the rear of the unit.  Thankfully I happened to have a HDMI angle bracket which solved the problem.

IMG_6869 IMG_6870

The Yamaha portable soundbar which you can see pictured above is used in deference to the built in speakers in the AOC 24” LED monitor.  The soundbar is charged via USB, which is conveniently connected to the Brix (and the WDTV before it), which means conservation of power sockets – only two are required (monitor and Brix).

Since it is a kitchen, interference from the microwave would play havoc with WiFi, so the unit is Ethernet connected to the home network via a wall plate socket.

The Finale

Well, surgery was a success.  On top of replacing the WDTV, we now have a fully functional Windows 10 installation which means we have a complete PC in a tiny footprint.  I modified the OS to automatically boot a user account on start up, and then configured Kodi to load on sign in.

IMG_6875  IMG_6874

I’ll go into the software configuration in a separate piece, but suffice to say Kodi is brilliant.   I love the fact that you can control it with an iOS app (see above) when running on the same network.

Now there was one final puzzle to solve – how to make this installation a fully fledged computing environment, but with an incredibly minimalist  approach?

Enter a fully collapsible BlueTooth mobile keyboard and a run of the mill wireless mouse.  The keyboard wouldn’t hack it as a full time solution, but for ad hoc use it is perfect, and the mouse is – well, functional.



That’s it for now.  I’ll return to this subject to write at length about how to get Windows 10 optimally configured for use as a media operating system at a later time.

Review: Official Apple iPhone 6 Super Fast Charger

Our phones are fast becoming the centre of our daily lives, whether it be for business or personal use.  This being the case, it will come as no surprise that a flat battery – especially with a device without a removal battery – can be devastating under the right circumstances.

The iPhone 6 and 6 Plus represents no small an investment in a personal mobile device, and despite successive iOS releases which have improved battery life and overall performance, battery drain is still an active issue.  Therefore, any advantage – say, faster charging times – is worth investigating.

Enter the Official Apple Super Fast Charger 

Super Fast Charger compared to the standard Charger

The IPhone 6 ships with a fairly minimalist (it’s Apple’s style, after all) 1A charger which does the job, but is a tad underpowered.  The Super Fast Charger on the other hand provides a whopping 2.1A (10W) charge to provide the “as advertised” super fast charging.

I’ve completed side-by-side comparisons, and the numbers work – the super fast charger has provided around a 25%-50% reduction in charging times, depending mainly on how much charge was left in the phone at the time of charging.

It will take a little longer to determine if the charging times vary based on the age of the device, but at this stage, a 10-month old iPhone 6 is recharging from 75% to 100% in under a half hour of charging with the super fast charger.

Comparison Unit

The super fast charger is materially larger than the out-of-the-box charger, which is to be expected.   The review unit came with the UK plug, so was used with a UK->AUS plug adapter.

IMG_6913 IMG_6912
Additional comparison shots

It might be larger, but it’ll still pack easily enough into your travel gear or suitcase, or find itself happily charging next to your desk at work.

Review items kindly provided by our friends at Mobile Zap.