sqlite in windows runtime component

北城余情 提交于 2019-12-04 22:12:56

I don't understand what these errors are, but did you first install the SQLite for Windows Runtime through Tools > Extensions? sqlite-net is LINQ query library

A Windows runtime component has many limitations regarding the types it exposes externally.

When you include sqlite-net, all its types are declared public and would effectively become exposed by the component. This is the reson for the errors you are seeing.

You can do one of two things to resolve the problem:

  • You can change all public modifiers in SQLite.cs and SQLiteAsync.cs files to internal. This will make it more difficult for you to update the package to a newer version since you'll have to repeat the process every time (a couple of minutes of work).
  • You can create a separate Windows Store apps class library, reference sqlite-net from there and reference this class library from your Windows runtime component. This way sqlite-net's classes won't be automatically exposed by the component.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!