question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The specified framework version '2.1' could not be parsed The specified framework 'Microsoft.NETCore.App', version '2.1' was not found.

See original GitHub issue

Just now seeing this error when trying to run update-database from PM console. I have the latest SDK installed.

I’ve tried repairing VS2017 and also uninstalling/reinstalling the latest .NET Core SDK.

What am I doing wrong here?

PM> update-database
The specified framework version '2.1' could not be parsed
The specified framework 'Microsoft.NETCore.App', version '2.1' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\
  - Installing .NET Core prerequisites might help resolve this problem:
      http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download
  - The following versions are installed:
      2.0.7 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.0.9 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.0 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.1 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.2 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.3 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.4 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
      2.1.5 at [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

image

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

52reactions
aherrickcommented, Oct 9, 2018

Hey all - I believe we figured this out. Our issue was we did have the correct project selected in PM, however the correct Project in the solution wasn’t set as Startup. Once I set the actual Core Web project as Startup, it worked. Confusing to say the least!

Thanks for the help anyway!

6reactions
featherbitscommented, Nov 5, 2018

Had the same issue. This

Check application dependencies and target a framework version installed at

is a clue on what to do next. So, I added <RuntimeFrameworkVersion>2.1.5</RuntimeFrameworkVersion> and got output like this

Your startup project ‘App.Database.Migrations.MySql’ doesn’t reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again.

So the problem actually was a missing reference to Microsoft.EntityFrameworkCore.Design package. Actually no need for the <RuntimeFrameworkVersion>2.1.5</RuntimeFrameworkVersion>.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The specified framework 'Microsoft.AspNetCore.App' ...
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0' was not found · 4. Apparently they released the nuget packages that rely on ...
Read more >
It was not possible to find any compatible framework version
The framework 'Microsoft.NETCore.App', version '2.1.0' was not found. ... You can resolve the problem by installing the specified framework and/or SDK.
Read more >
Migrate from ASP.NET Core 2.2 to 3.0
It was not possible to find any compatible framework version The specified framework 'Microsoft.AspNetCore.App', version '3.0.0' was not ...
Read more >
Breaking changes in .NET Core 3.0
If you're migrating to version 3.0 of .NET Core, ASP.NET Core, or EF Core, the breaking changes listed in this article may affect...
Read more >
NETSDK1045: The current .NET SDK does not support ...
This error occurs when the build tools can't find the version of the .NET SDK that's needed to build a project. This is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found