ASP.Net 5 DNX is not a recognized command

date_range  20 June 2015

ASP.Net
Tutorial
.Net Development

Recently, I’ve been playing around with ASP.Net 5 and MVC 6. They go hand-in-hand with the new version of Entity Framework; version 7. At the time of writing the latest version is Beta 4.

One of the first problems I came across and only found the solution by chance was that the migrations commands were not available. Entity Framework no longer works from the Package Manager Console, instead working via commands executed via the .NET Execution Environment (DNX). What you’ll see if you have set a DNX, however, is a message like this:

dnu

Simple solution; load a DNX:

dnvm use default

Now we can call the Dot Net Utility (DNU) to pull in any missing Nuget packages:

dnu restore

Now the Entity Framework commands are available. Problem solved.

dnx . ef

dnx

comments powered by Disqus

chevron_left Archive