'dotnet ef database update' errors when sub-minor version is not 0
See original GitHub issueSteps to reproduce
apt-get install dotnet-sdk-2.1=2.1.301-1
cd <path/to/database/proj>
dotnet ef database update
Expected behavior
Database update is run using dotnet-runtime-2.1.x (latest installed on box)
Actual behavior
dotnet falls back to 2.1.0 instead of finding 2.1.x
It was not possible to find any compatible framework version
The specified framework 'Microsoft.NETCore.App', version '2.1.0' was not found.
- Check application dependencies and target a framework version installed at:
/usr/share/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.5 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
2.0.7 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
2.1.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Environment data
.NET Core SDK (reflecting any global.json):
Version: 2.1.301
Commit: 59524873d6
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
Base Path: /usr/share/dotnet/sdk/2.1.301/
Host (useful for support):
Version: 2.1.1
Commit: 6985b9f684
.NET Core SDKs installed:
2.1.301 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Extra Details
This is not an issue on Windows as the dotnet installer does not clean up old versions of the runtime. apt-get will cleanup all old files contained in the older versions.
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (4 by maintainers)
Top Results From Across the Web
Error running update-database entityframeworkcore 2
WebApi\bin\Debug\netcoreapp2.0\ef.xml'. I have tried cleaning the project, re-compiling (there are no errors), I have also ...
Read more >Cant Update dataBase after Adding a new Migration In EF ...
My class is public class Ittracker { [Required] [RegularExpression("([a-zA-Z][a-zA-Z ]+)", ErrorMessage = "Only alphabets are allowed")] ...
Read more >Troubleshooting the dotnet ef command for EF Core ...
The most common one is. No executable found matching command "dotnet-ef" ... After March 7 release, this will just be version “1.0.0”.
Read more >How to Solve the Command or File Was Not Found EF ...
In this article, we are going to learn how to solve the Command or File Was Not Found EF Core migration error.
Read more >How to fix EF Core Update Database Migration issue in VS 2022
Unlock the power of Microsoft . NET Core with my engaging Udemy courses! For all the details and limited-time $9.99 pricing, scroll down...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wli3 can you investigate when you get a chance?
I’m seeing this exact issue on Windows:
and --info:
As a workaround I was able to install 2.1.0 from here: https://www.microsoft.com/net/download/dotnet-core/runtime-2.1.0 and the problem went away, but I thought I’d mention it in case it’s a bigger issue.