lmcdo
lmcdo

Reputation: 45

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

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.

Upvotes: 0

Views: 635

Answers (2)

Doc VD
Doc VD

Reputation: 1

Removing the following cleared it up for me: Uninstall-Package Microsoft.EntityFrameworkCore.SqlServer.Design

Upvotes: 0

GeorgeT
GeorgeT

Reputation: 97

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.

Upvotes: 5

Related Questions