mrahhal / Migrator.EF6

.NET Core CLI tool to enable EF6 migrations in an Asp.Net Core app.
MIT License
82 stars 15 forks source link

Getting error message in command line when running dotnet ef enable #10

Closed Ksyruz closed 8 years ago

Ksyruz commented 8 years ago

image

mrahhal commented 8 years ago

Could you provide more details please? How is your project.json structured? You could be missing something.

Ksyruz commented 8 years ago

Hi,

"Contexts" is a class library (repository) and the "Web" is the webapi.

I am running the commands using the class library location with the connection string embedded into the code.

mrahhal commented 8 years ago

See #9. Currently with "Tools Preview 1" you can't use a .NET Core tool in a library project.

What you can do is have the "Contexts" project contain your models, that's fine. But you'll have to use migrations inside your web app. So you'll use dotnet ef inside your webapi project instead of your "Contexts" project.

Ksyruz commented 8 years ago

Thanks for getting back so fast, I will do that.

mrahhal commented 8 years ago

@Ksyruz I'm closing this. If you still have problems you can open a new one.