locked
Using Xamarin.Forms in UWP with SQLiteNetExtensions RRS feed

  • Question

  • User381156 posted

    I created a simple UWP blank app added the following line to the OnLaunched method of my App.cs file.

    Xamarin.Forms.Forms.Init(e);

    This is the only change to the blank app I have made other than I need to have use SQLiteNetExtensions.Async so I added that Nuget package along with other supporting packages. Now when I run the application I get the following:

    'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Xamarin.Forms.Core.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\netstandard.dll'. Module was built without symbols. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.32.32002.13001.0x868wekyb3d8bbwe\Microsoft.UI.Xaml.winmd'. Module was built without symbols. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Private.Uri.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.ObjectModel.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Collections.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Linq.Expressions.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Linq.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Runtime.Extensions.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Threading.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Microsoft.UI.Xaml.Markup.winmd'. Symbols loaded. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Reflection.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Threading.Tasks.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Amporis.Xamarin.Forms.ColorPicker.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\DLToolkit.Forms.Controls.FlowListView.dll'. Cannot find or open the PDB file. The thread 0x5654 has exited with code 0 (0x0). The thread 0x4d44 has exited with code 0 (0x0). 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\FFImageLoading.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\FFImageLoading.Forms.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\FFImageLoading.Forms.Platform.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\FFImageLoading.Platform.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\FFImageLoading.Svg.Forms.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\FFImageLoading.Svg.Platform.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\MREInventoryKeeper.dll'. Symbols loaded. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\MREProgramming.SharedTools.dll'. Symbols loaded. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Newtonsoft.Json.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Pillar.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Pillar.Ioc.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Plugin.FilePicker.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Plugin.Media.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Plugin.Permissions.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Rg.Plugins.Popup.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Rg.Plugins.Popup.UWP.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SkiaSharp.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SQLite-net.dll'. Module was built without symbols. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SQLiteNetExtensions.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SQLiteNetExtensionsAsync.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SQLitePCLRaw.batteriesgreen.dll'. Module was built without symbols. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SQLitePCLRaw.batteriesv2.dll'. Module was built without symbols. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SQLitePCLRaw.core.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\SQLitePCLRaw.provider.esqlite3.dll'. Module was built without symbols. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\System.Data.SQLite.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\System.Data.SQLite.EF6.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\System.Data.SQLite.Linq.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\System.Drawing.Common.dll'. Symbols loaded. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\System.Runtime.CompilerServices.Unsafe.dll'. Module was built without symbols. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Xamarin.Essentials.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Xamarin.Forms.Platform.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\Program Files\WindowsApps\Microsoft.NET.CoreFramework.Debug.2.22.2.28529.0x868wekyb3d8bbwe\System.Reflection.Extensions.dll'. Cannot find or open the PDB file. 'App2.exe' (CoreCLR: CoreCLRUWPDomain): Loaded 'C:\App2\bin\x86\Debug\AppX\Xamarin.Forms.Xaml.dll'. Cannot find or open the PDB file. Exception thrown: 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll Could not load file or assembly 'esqlite3, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

    I have tried adding the list of assemblies like so:

    List<Assembly> assemblies = new List<Assembly>();
    assemblies.Add(typeof(SQLitePCL.raw).Assembly);
    //add additional assemblies...
    Xamarin.Forms.Forms.Init(e, assemblies);
    

    This also fails in the same way. In fact I can not seem to make any headway on this at all. How do you use Xamarin.Forms in UWP with SQLiteNetExtensions? If I remove the references to SQLiteNetExtensions the Init will work, but I have to have SQLiteNetExtensions.

    Versions: Xamarin.Forms version = 4.5.0.495 SQLiteNetExtensions.Async version 2.1.0 sqlite-net-pcl version 1.6.292 SQLitePCLRaw.bundle_green version 1.1.13 System.Data.SQLite.Core version 1.0.112

    esqlite3.dll is in two bin folders: \bin\Debug\esqlite3.dll \bin\Debug\AppX\e_sqlite3.dll

    Wednesday, April 1, 2020 2:08 PM

All replies

  • User382871 posted

    'App2.exe' (CoreCLR: CoreCLRUWPDomain): ...\Xamarin.Forms.Core.dll'. Cannot find or open the PDB file. To solve this issue, try go to Tools -> Options -> Debugging -> Symbols and select Microsoft Symbol Servers, Visual Studio will download PDBs automatically.

    Check the link: https://stackoverflow.com/questions/28381361/cannot-find-or-open-the-pdb-file-visual-studio-c-2013

    Thursday, April 2, 2020 2:58 AM
  • User381156 posted

    Thank you for your reply. Im not too concerned about the PDB errors as they are just the debug symbols. What is more stopping for me is the last line:

    Could not load file or assembly 'e_sqlite3, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

    Also, I am now finding that I can't get UWP to load even without data (I removed all the SQL related nugets), now getting this line when I attempt to run Xamarin.Forms.Forms.Init(e):

    Exception thrown: 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll Could not load file or assembly 'Microsoft.Graphics.Canvas, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

    Thursday, April 2, 2020 4:19 AM
  • User382871 posted

    Could not load file or assembly 'Microsoft.Graphics.Canvas, Culture=neutral, PublicKeyToken=null'... Try the following step:

    Properties -> Build -> enable Compile with .NET Native tool chain

    https://github.com/xamarin/Xamarin.Forms/issues/5471#issuecomment-526946435

    Friday, April 3, 2020 5:56 AM
  • User381156 posted

    Again, thank you for your assistance, it is much appreciated. I had tried that before and ran into troubles. However, after your comments I decided to set the option and wipe all of the bin and obj files and rebuild. This did change the issue and it appears that it now does get past the Microsoft.Graphics.Canvas issue, but it is now stopping here:

    Exception thrown: 'System.IO.FileNotFoundException' in System.Private.Reflection.Core.dll Cannot load assembly 'clrcompression'. No metadata found for this assembly.

    Currently the Compile with .NET Native tool chain option is ENABLED for the project. There seems to be a lot of questionable solutions to this new error. Several posts I found really could not explain explicitly what actually caused their problem to go away. In fact, several posts I found said to just ignore the error. Ignoring the "System.IO.FileNotFoundExeception" sounds like a recipe for trouble later.

    Saturday, April 4, 2020 3:07 AM
  • User382871 posted

    Check the tutorial about Setup Windows Projects. https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/windows/installation/

    Tuesday, April 7, 2020 10:11 AM