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.

dotnet ef commands broken in Dev16 2.2 Web app targeting .NET Framework

See original GitHub issue

Steps:

  • 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:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
bricelamcommented, Jan 11, 2019

Not seeing any issues using SDK 2.2.200-preview-009748…

1reaction
ajcvickerscommented, Jan 11, 2019

@smitpatel Typo–I removed the no. This repros for me consistently on the Dev16 preview. I’ll add you to an email thread.

Read more comments on GitHub >

github_iconTop 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 >

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