0
votes

When trying to install the 'MySql.Data.EntityFrameworkCore' package, I get the following error:

Microsoft (R) Build Engine version 15.1.548.43366 Copyright (C)

Microsoft Corporation. All rights reserved.

Writing /tmp/tmpiXrULm.tmp info : Adding PackageReference for package 'MySql.Data.EntityFrameworkCore' into project '/media/xxx/xxx.csproj'. log : Restoring packages for /media/xxx/xxx.csproj... info : CACHE https://api.nuget.org/v3-flatcontainer/mysql.data.entityframeworkcore/index.json error: Unable to resolve 'MySql.Data.EntityFrameworkCore' for '.NETCoreApp,Version=v1.1'. error: Package 'MySql.Data.EntityFrameworkCore' is incompatible with 'all' frameworks in project '/media/xxx/xxx.csproj'.

I'm targeting Asp.NetCore 1.1.1

Is this the correct MySql EF package for .NET core?

1
When you don't post your csproj content for the references we can't tell you. You didn't tell us even which verison of the provider you want to use. Also please look at my answer hereTseng

1 Answers

0
votes

Install given nuget package using package manager console:

Install-Package MySql.Data.EntityFrameworkCore -Version 8.0.9-dmr

OR

Using .NET CLI:

dotnet add package MySql.Data.EntityFrameworkCore --version 8.0.9-dmr

Then add this to .csproj file and restore your project:

<PackageReference Include="MySql.Data.EntityFrameworkCore" Version="8.0.8-dmr" />