DotNetCore and EF: “The specified framework… was not found.”

In late December 2016 I find that the default DotNetCore and default DotNetCore SDK are not playing nicely when it comes to the command line

dotnet ef

I believe I have now found a fail-safe way of getting the command to work, without playing around with project.json. That solution simply means selecting the LTS (Long Term Support) version of the DotNetCore runtime rather than the Current version. But it took me a long time to get to that realization.

First, the screenshots showing the 2 errors which blocked any progress on this for some time, and which seem to crop up pretty frequently on a Google:


I then went back to a clean-ish machine, defined, as:

  1. no DotNetCore references in Programs and Features – that is both for the runtime and SDK
  2. recursive deletion of c:\Program Files\Dotnet
  3. prove that [dotnet] executing under PowerShell returns [no such command] of somesuch.

These are the key locations for getting the correct combination of files, right now:

So for the runtime, I grabbed the Current / Windows / .NET Core 1.1 runtime – Installer, noting and installing that version of the installer. The fact it is the Current version will be significant later in the post:




Now create a new working folder, e.g. c:\sandbox\t1 and navigate there (admin mode). Prove that [dotnet] now works:


All good. Now what happens if we try to run dotnet commands?


Fine. Return to the sdk location referenced above:


Note that confusingly it is the .Net Core element that is 1.1.0, with the SDK element 1.0.0. Regardless. Now try the [dotnet ef] command again…


No executable found matching command "dotnet-ef"

Hm. It requires you to invoke in fact the template Web to get this to work. So do e.g..

dotnet new -t Web

Now try [dotnet ef], and you get a different error:


The specified framework 'Microsoft.NETCore.App', version '1.0.0' was not found.
 - Check application dependencies and target a framework version installed at:
 C:\Program Files\dotnet\shared\Microsoft.NETCore.App
 - The following versions are installed:
 - Alternatively, install the framework version '1.0.0'.

Let’s look at what P&F says we have:


1.1.0 both for the Runtime and for the SDK. Yet the message says I have “specified” 1.0.0. No I haven’t. I spent some time trying to marry up the project.json and the project.lock.json content to reconcile what was generated. I couldn’t, suggesting to me that the 1.0.0 requirement is somehow baked into DotNetCore EF in the current version. So then I went back to the downloads area above, and rather than specifying the Current version, I asked for the LTS or Longterm Support Version of the Runtime:





So although it says above it wants 1.0.0, maybe 1.0.3 is good enough. We run [dotnet ef] again, and this time we have lift-off:


And the installation has created a 1.0.3 runtime location in addition to the 1.1.0 runtime that was already there from the earlier default installation from the download area.


That’s all for this article. Another day we will look at scaffolding the EF project.

I will leave in some other screenshots:


2 thoughts on “DotNetCore and EF: “The specified framework… was not found.”

  1. THANK YOU!!! Totally got me out of a jam. And no other advice on the web included so much detail and the latest versions. I really appreciate it. I didn’t follow the steps completely, but at least got rid of the old software, installed it all again, as per your instructions and EF commands work again!

    • Thanks John. I really appreciate the great feedback. I do sometimes whether to keep that level of detail in my posts. Your reply tells me I’m on the right track. Thanks ☺.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s