When using Scaffold-DbContext for UWP I get 'Unable to load DLL 'sqlite3''

后端 未结 1 2014
梦如初夏
梦如初夏 2021-01-23 11:19

I am trying to scaffolf an Entityframeworkcore DbContext for a UWP app from a Sqlite databse. I do:

Scaffold-DbContext \"data source=C:\\SqliteDbFiles\\Sqlite.db         


        
相关标签:
1条回答
  • 2021-01-23 12:04

    The version of sqlite3.dll used at runtime on UWP won't work at design-time. You can manually download one of the Precompiled Binaries for Windows and copy it to the output directory (e.g. bin\x86\Debug) before running the command.

    A simpler solution might be to scaffold the DbContext in a non-UWP project and just copy the classes into the UWP project after they're generated.

    0 讨论(0)
提交回复
热议问题