![](/img/trans.png)
[英]Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. Error on Windows Server 2012
[英]WP8 SQLite error: The specified module could not be found
我正在尝试从我的Windows Phone 8应用程序访问SQLite数据库,但每当遇到SQLite代码时遇到以下错误:
{System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at Sqlite.Sqlite3.sqlite3_open_v2(String filename, Database& db, Int32 flags, String zVfs)
at SQLite.SQLite3.Open(String filename, Database& db, Int32 flags, IntPtr zVfs)
at SQLite.SQLiteConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks)
at TopoMap.Map.MapTileServer.<Initialise>d__0.MoveNext()}
项目运行正常,没有任何问题,直到访问基础Sqlite3类的一行代码。
任何想法可能是什么问题?
添加编译配置
7.1右键单击项目,然后选择“属性”。
7.2选择“构建”选项卡。
7.3在“配置”列表中,选择“所有配置”。
7.4在“平台”列表中,选择“所有平台”。
7.5在“构建”选项卡上,您将看到“常规”标题下的条件编译符号,其中包含Windows Phone应用项目上的默认值SILVERLIGHT; WINDOWS_PHONE。 将值更改为SILVERLIGHT; WINDOWS_PHONE; USE_WP8_NATIVE_SQLITE并保存项目文件。
右键单击引用并选择添加引用。转到Windows Phone - > Extensions并选中SQlite for Windows Phone选项
这个对我有用!! 祝好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.