2013-05-22 73 views
1

我使用monodroid并通过sqlite-net库使用数据库。 在一个应用程序事务中的所有数据将正确地从数据库, 越来越但是当我申请下一次部署我的数据库文件不存在。不创建保存数据库

我真的使用方法有些像these

但我m testing same code in MonoTouch and WP7 application and it小号还好吧。

所以问题是:为什么数据库总是丢失?

回答

6

为了保持数据与缓存数据的应用程序安装:

在Visual Studio:

Click Tools > Options... 
In the left-hand tree, select Xamarin > Android Settings 
In the right-hand panel, select [X] Preserve application data/cache on device between deploys. 

在Xamarin演播室:

Click Tools > Options (Windows) or Xamarin Studio > Preferences (OS X) 
In the left-hand tree, select Projects > Android 
In the right-hand panel, select [X] Preserve data/cache between application deploys. 

立足岗位on Xamarin Forum

+0

大感谢您!!! – Dmitry