C# 无法加载文件或程序集';e_sqlite3

C# 无法加载文件或程序集';e_sqlite3,c#,xamarin.forms,xamarin.uwp,sqlite-net-pcl,C#,Xamarin.forms,Xamarin.uwp,Sqlite Net Pcl,调试UWP项目时,出现以下错误: System.IO.FileNotFoundException:'无法加载文件或程序集 'e_sqlite3,区域性=中性,PublicKeyToken=空'。系统不能 查找指定的文件。' 错误发生在这一行: Xamarin.Forms.Forms.Init(e) 从以下代码块: 有点背景。。。我从解决方案中的3个项目开始(共享库、WPF和Android)。该应用程序目前正在Android和WPF项目中读取和写入sqlite文件 我刚刚添加了UWP项目。在添加

调试UWP项目时,出现以下错误:

System.IO.FileNotFoundException:'无法加载文件或程序集 'e_sqlite3,区域性=中性,PublicKeyToken=空'。系统不能 查找指定的文件。'

错误发生在这一行:
Xamarin.Forms.Forms.Init(e)

从以下代码块:

有点背景。。。我从解决方案中的3个项目开始(共享库、WPF和Android)。该应用程序目前正在Android和WPF项目中读取和写入sqlite文件

我刚刚添加了UWP项目。在添加了对共享库的引用并添加了相关的nuget包之后,我在调试UWP项目时遇到了错误

以下是我当前的解决方案:

我使用的是SQLite net pcl nuget版本1.5.231(发布时最新的稳定版本)。

我还有SQLiteNetExtensions和SQLiteNetExtensions.Async nuget包。

我的UWP项目有: 目标版本:Windows 10,版本1809 最低版本:Windows 10秋季创建者更新

我已经找到了很多关于这个问题的帖子,但它们似乎都表明这在SQLite net pcl版本1.5.166中得到了解决,我正在使用一个更新的版本

另一篇文章提到使用VisualStudio的sqlite扩展,我找不到它。这篇文章已经发布了几年,所以修复可能不相关,因为它引用的是VisualStudio2015

我正在使用Visual Studio Professional 2017,版本15.9.9。在Windows 10 Pro工作站上运行,包含所有最新更新和service Pack


有人对如何解决此问题有任何建议吗?

您是否尝试过使用SQLite net pcl 1.5.166版而不是更新的版本?我已经看到此问题出现过好几次了。我仍然不知道要修复/取消锁定此项有什么更改。添加SQLite net pcl没有帮助。将我的所有包从packages.config文件更改为基于项目的似乎在我第一次看到它时就解决了这个问题。(右键单击项目上的选项以执行此操作)。顺便说一句,e_sqlite3确实存在。
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
    Frame rootFrame = Window.Current.Content as Frame;

    // Do not repeat app initialization when the Window already has content,
    // just ensure that the window is active
    if (rootFrame == null)
    {
        // Create a Frame to act as the navigation context and navigate to the first page
        rootFrame = new Frame();

        rootFrame.NavigationFailed += OnNavigationFailed;

        Xamarin.Forms.Forms.Init(e);

        if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
        {
            //TODO: Load state from previously suspended application
        }

        // Place the frame in the current Window
        Window.Current.Content = rootFrame;
    }

    if (e.PrelaunchActivated == false)
    {
        if (rootFrame.Content == null)
        {
            // When the navigation stack isn't restored navigate to the first page,
            // configuring the new page by passing required information as a navigation
            // parameter
            rootFrame.Navigate(typeof(MainPage), e.Arguments);
        }
        // Ensure the current window is active
        Window.Current.Activate();
    }
}