简体   繁体   English

Windows Universal 8.1中的后台任务和SQLite

[英]background task and SQLite in windows Universal 8.1

I created a project of Windows Universal app. 我创建了Windows Universal应用程序的项目。 Then I add a new Runtime Component (background task C#) for update my tile. 然后,我添加一个新的运行时组件(后台任务C#)以更新我的图块。
Then I install sqlite-net for background task. 然后我安装sqlite-net进行后台任务。 I want to read some data from my database. 我想从数据库中读取一些数据。 When I want to run my app, I get some error from SQLite.cs. 当我想运行我的应用程序时,我从SQLite.cs收到一些错误。

http://borjianamin.persiangig.com/errors.png http://borjianamin.persiangig.com/errors.png

I search a little and I found this Topic: (I'm sorry for this because I don't have enough reputation) 我搜索了一下,然后发现了以下主题:(对此我感到抱歉,因为我的声誉不高)
stackoverflow.com/questions/14812076/how-to-connect-to-sqlite-database-from-windows-runtime-component-which-is-for-ru stackoverflow.com/questions/14812076/如何从Windows运行时组件到sqlite数据库的连接
github.com/praeclarum/sqlite-net/issues/104 github.com/praeclarum/sqlite-net/issues/104

I use replace tool of VS2015 and replace all public with internal But I get about 300 errors this time. 我使用VS2015的替换工具并将所有public替换为内部,但是这次我遇到了大约300个错误。

This is my background task project only: 这只是我的后台任务项目:
Link: http://www.rodfile.com/uu9viaaxsz91 链接: http//www.rodfile.com/uu9viaaxsz91

Is it possible to help me? 有什么可以帮助我的吗?

Thanks. 谢谢。

Yes it is possible. 对的,这是可能的。 You have to add a separate project for SQLite called Class Library . 您必须为SQLite添加一个名为类库的单独项目。

在此处输入图片说明

Then you have to add sqlite.net in that class library. 然后,您必须在该类库中添加sqlite.net。 After that you need to add the reference of Class Library on Windows Runtime Component. 之后,您需要在Windows运行时组件上添加类库的引用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM