Missing definition for UseSqlite in DbContextOptionsBuilder class of Microsoft.EntityFrameworkCore.Tool

entity-framework-core sqlite uwp uwp-xaml windows-10-mobile

Question

To enter a picture from a Windows folder location into a table on SQLite and display it on the Windows phone, I'm attempting to create a simple phone app using the UWP framework.

I'm using this article I discovered on the Technet Forum as a source:

https://social.technet.microsoft.com/wiki/contents/articles/37975.save-and-load-images-in-universal-windows-app-with-sqlite-and-entity-framework-core.aspx

I have trouble installing the package Microsoft.EntityFrameworkCore.Tools (latest stable ver. 2.0.1) when following the instructions:

PM>  Install-Package Microsoft.EntityFrameworkCore.Tools
  GET https://api.nuget.org/v3/registration3-gz/microsoft.entityframeworkcore.tools/index.json
  OK https://api.nuget.org/v3/registration3-gz/microsoft.entityframeworkcore.tools/index.json 74ms
Restoring packages for c:\users\intui\documents\visual studio 2017\Projects\PicturesApp\PicturesApp\PicturesApp.csproj...
Install-Package : Package Microsoft.EntityFrameworkCore.Tools 2.0.1 is not compatible with uap10.0.10586 (UAP,Version=v10.0.10586). Package 
Microsoft.EntityFrameworkCore.Tools 2.0.1 supports: netstandard2.0 (.NETStandard,Version=v2.0)
At line:1 char:2
+  Install-Package Microsoft.EntityFrameworkCore.Tools
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

The previous version (2.0.0) also had the same problem, but the prior version before that (1.1.4) was successfully installed.

However, I discovered that the "UseSqlite" function is not recognized by the "DbContextOptionsBuilder" class, which is used in the code for the "PictureAppContext" class:

Severity    Code    Description Project File    Line    Suppression State Error CS1061  'DbContextOptionsBuilder' does not contain a definition for 'UseSqlite' and no extension method 'UseSqlite' accepting a first argument of type "DbContextOptionsBuilder' could be found (are you missing a using directive or an assembly reference?)   PicturesApp c:\users\intui\documents\visual studio 2017\Projects\PicturesApp\PicturesApp\PictureAppContext.cs   16  Active

Does anybody know how to fix this problem?

Thanks!

1
6
11/19/2017 3:49:51 PM

Popular Answer

ZZZ_tmp
11
6/27/2018 1:10:00 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