WP 8.1 Silverlight connection problem on device (ARM): "Unable to set temporary directory."

Topics: Windows Phone , Xamarin
Sep 29, 2014 at 12:40 PM
Edited Sep 29, 2014 at 12:42 PM
Hi everyone.
We are using this library for a xamarin project. We have it working for android, our test project (.net 4.5) and the Windows Phone 8.1 emulator (x86).

When running it on a physcial WP 8.1 device however the following exception occur:
Unable to set temporary directory.
When digging into the innerexceptions the root of the problem seam to be something else.
{System.TypeLoadException: Could not find Windows Runtime type 'SQLitePCL.Ext.WindowsPhone8.RuntimeProxy.SQLite3RuntimeProvider'.
   at SQLitePCL.SQLite3Provider.Sqlite3Open(IntPtr filename, IntPtr& db)
   at SQLitePCL.SQLiteConnection..ctor(String fileName, Boolean setTemporaryDirectory)}
The code producing the exception:
protected SQLitePCL.SQLiteConnection ReferenceDataConnectionPcl
        {
            get
            {
                if (_refDataConnectionPcl == null)
                {
                    var dbfolder = IoC.IocContainer.GetInstance<IFileManager>().DatabaseFolder.Path; 
                    
                    _refDataConnectionPcl = new SQLitePCL.SQLiteConnection(Path.Combine(dbfolder, DB_FILENAME));
                }
                return _refDataConnectionPcl;
            }
        }
I believe the right packages have been added til the WP project
<packages>
  <package id="PCLStorage" version="0.9.6" targetFramework="wp81" />
  <package id="PhoneThemeManager" version="2.0" targetFramework="wp81" />
  <package id="Serilog" version="1.3.43" targetFramework="wp81" />
  <package id="SimpleInjector" version="2.5.2" targetFramework="wp81" />
  <package id="SQLite.Net.Platform.WindowsPhone8" version="2.3.0" targetFramework="wp81" />
  <package id="SQLite.Net-PCL" version="2.3.0" targetFramework="wp81" />
  <package id="sqlite-net-wp8" version="3.8.5" targetFramework="wp81" />
  <package id="WPtoolkit" version="4.2013.08.16" targetFramework="wp80" />
  <package id="Xamarin.Forms" version="1.2.2.6243" targetFramework="wp81" />
</packages>
Any idea what might be wrong and how to fix this issue?

Thanks in advance and have a great day
Oct 1, 2014 at 7:40 AM
I did find a solution to my problem :-)
Oct 22, 2014 at 8:34 AM
Please share the solution! :-)
May 2, 2016 at 2:39 PM
Can you share the solution ?..Am facing same issue on Windows Phone app 8.1
May 2, 2016 at 2:39 PM
U got any solution for this ?