0

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.

3
  • I tested EF core 2.0 with UWP app target 16299 and cannot reproduce your issue. Could you please detail the reproduce steps or a minimal reproducible example?
    – Sunteen Wu
    Oct 19, 2017 at 8:48
  • Did your minimal version is 16299? This is also required.
    – Sunteen Wu
    Oct 25, 2017 at 1:44
  • I did set the minimal version to 16299. I forgot to mention an important point -- I was using EF 2.0 from a .NET Standard library. It looks like there's a documented set of issues around similar problems. I have other work I can do on the project while those issues are worked on. Thank you for the responses!
    – lmcdo
    Oct 25, 2017 at 6:25

2 Answers 2

5

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.

3
  • Can't yet verify whether this solves my problem but I will take a look soon. Worth noting -- I was using Sqlite as my provider, but there probably isn't a difference. Also, while I agree with the premise of your solution you're basically just telling me to remove the problematic reference :P
    – lmcdo
    Dec 7, 2017 at 17:53
  • I might be mistaken because I cant now find the link, but I seem to remember seeing a forum post somewhere saying that the problem occurs because functionality that was in EntityFrameworkCore.Relational was moved to Microsoft.EntityFrameworkCore.SqlServer or something of that nature. I'm assuming the same would be true for EntityFrameworkCore.Sqlite I guess.
    – GeorgeT
    Dec 8, 2017 at 13:10
  • This worked for me. Make sure you are only cutting down on your Microsoft.EntityFrameworkCore.* references.
    – Sigex
    Jun 1, 2018 at 21:11
0

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

1
  • I can't really test if your solution solves my problem as I've moved to Qt for targeting UWP and axed the tooling I would use to do so. (Qt and VS are both disk hogs, and I only had room for one.) I think your answer solves my generic question, but I didn't word my question quite right and wouldn't answer as such.
    – lmcdo
    Apr 19, 2018 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.