dotnet ef commands broken in Dev16 2.2 Web app targeting .NET Framework
See original GitHub issueSteps:
- Use current Dev16 preview
- Create a new “ASP.NET Core Web Application” (Doesn’t repro with console app.)
- In the One ASP.NET dialog, select “.NET Framework” “ASP.NET Core 2.2”, and create an “Web Application” with HTTPS and “Individual User Accounts” auth.
- Build everything
- Open a developer command prompt for Dev16
- Change to the project dir
- Run
dotnet ef dbcontext list
Result:
C:\Stuff\WebApplication5\WebApplication5>dotnet ef dbcontext list An error occurred while accessing the IWebHost on class ‘Program’. Continuing without the application service provider. Error: Could not load file or assembly ‘System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) WebApplication5.Data.ApplicationDbContext
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Command dotnet ef not found
You intended to execute a .NET Core program, but dotnet-ef does not exist. You intended to run a global tool, but a dotnet-prefixed...
Read more >Troubleshoot .NET Framework targeting errors
NET Framework applications, follow these steps: Open Solution Explorer. Select Show All Files, and then edit the app.
Read more >Troubleshooting the dotnet ef command for EF Core ...
If your project targets the full .NET framework, then you'll need to use the PowerShell commands e.g. add-migration, update-database. Make sure ...
Read more >.NET core vs .NET framework
Wondering about the difference between .NET Core & .NET Framework? Here's a quick guide on how to pick the right runtime environment for...
Read more >Upgrading from .NET Core 2.1 to .NET 6.0
I upgraded an old project from .NET Core 2.1 to .NET 6. Here's what broke.
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 Free
Top 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
Not seeing any issues using SDK 2.2.200-preview-009748…
@smitpatel Typo–I removed the no. This repros for me consistently on the Dev16 preview. I’ll add you to an email thread.