Config error with EF 2.0, UWP (targeting 16299 and later), and Nuget

c# database entity-framework-core sqlite uwp

Question

I'm currently trying to build a UWP with EF Core, and decided since I saw 2.0 support was coming with the update today to use EF 2.0 with a UWP targeting 16299 and later.

I got EF Core working (migrations, etc) for sure, using a sample dotnet core console app. When I went to work on the UWP, I ran into the following error, which appears to be Nuget related:

Error
Cannot find type Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames 
in module Microsoft.EntityFrameworkCore.Relational.dll

I've installed the relevant package (to my knowledge). I don't know what further information is relevant, so I'll update my post as needed.

Additionally, the output log error is more descriptive:

C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(353,5): Xaml Internal Error error WMC9999: Cannot find type Microsoft.EntityFrameworkCore.Metadata.Internal.RelationalFullAnnotationNames in module Microsoft.EntityFrameworkCore.Relational.dll.

1
0
4/9/2020 9:54:22 PM

Popular Answer

I had this problem and it was because I had referenced too much stuff.

I had references to :

Microsoft.EntityFrameworkCore
Microsoft.EntityFrameworkCore.Relational
Microsoft.EntityFrameworkCore.Relational.Design
Microsoft.EntityFrameworkCore.SqlServer.Design
Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Tools

but I only need

Microsoft.EntityFrameworkCore.SqlServer
Microsoft.EntityFrameworkCore.Tools

when i removed the unneeded references cleaned soln, and restarted vs, everything worked ok.

5
12/6/2017 3:08:05 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow