Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DOTNET CLI RC2 EF migrations

I just migrated to RC2 from RC1 and having a really hard time getting the ef commands and migrations to work.

I've read several other questions and have ran into the problem that's getting described in this link as a known issue.

The problem is that if I follow the instructions and create a brand new console application (.core) I'm still getting the following message:

This preview of Entity Framework tools does not support targeting class library projects in ASP.NET Core and .NET Core applications. See http://go.microsoft.com/fwlink/?LinkId=798221 for details and workarounds.

What am I doing wrong? Do I need to revert to rc1?

like image 661
dont_trust_me Avatar asked Sep 16 '26 08:09

dont_trust_me


1 Answers

How did you do this migration ? I ask because in my case everything works time - as for now.

In my case I have removed all RC1 components first and then I have installed new RC2 components...

Next I have created new APS project using new Visual Studio Templates to get correct references and just moved my code to this new project.

Of course it's few things which I had to update in my code, but everything works fine for me including ef commands and migrations.


As you can read in ASP.NET Core installation guide

Before you start

Remove all previous versions of .NET Core from your system by using Add/Remove programs.

You need RC1 setup file to uninstall this component - if you do not have it, check StackOverflow - you can find link to download missing files.


Try follow the docs:

ASP.NET 5 RC1 apps were based on the .NET Execution Environment (DNX) and made use of DNX specific features. ASP.NET Core RC2 is based on .NET Core, so you must first migrate your application to the new .NET Core project model. See Migrating from DNX to .NET Core CLI for more information.


Hope this help you :)

like image 73
Lukasz Mk Avatar answered Sep 18 '26 18:09

Lukasz Mk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!