Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load SQLite-net on Xamarin.Forms UWP #627

Open
obache opened this issue Aug 31, 2017 · 10 comments
Open

Could not load SQLite-net on Xamarin.Forms UWP #627

obache opened this issue Aug 31, 2017 · 10 comments

Comments

@obache
Copy link

obache commented Aug 31, 2017

How to reproduce

  1. Create new project with Visual Studio 2017
  2. Select "Cross Platform App (Xamarin)" template
  3. configure as "UI" with "Xamarin.Forms", "Shareing Code" with "PCL"
  4. open Solution NuGet package manager
  5. install sql-net-pcl package and update other packages too
  6. Put followings into "App" constructor in App.xaml.cs
            var databasePath = Path.GetRandomFileName();
            var conn = new SQLiteAsyncConnection(databasePath);
  1. Start App.UWP project debugging
  2. System.IO.FileLoadException exception will be thrown

System.IO.FileLoadException: 'Could not load file or assembly 'SQLite-net, Version=1.4.118.0, Culture=neutral, PublicKeyToken=null'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'

Environment

  • Visual Studion 15.3.3
  • NuGet 4.3.1
  • Xamarin 4.6.0.299
  • Xamarin.Forms 2.3.4.270
  • sqlite-net-pcl 1.4.118

Additional Info

  • With sqlite-net-pcl 1.3.3, it worked well.
  • Android project works well even with 1.4.118
@blue-toe
Copy link

blue-toe commented Sep 7, 2017

I have exactly the same problem. iOS also loads fine.

@mesta1
Copy link

mesta1 commented Sep 12, 2017

Have the same problem.
When adding the project manually instead of using NuGet it works, so it seems just a matter of updating the NuGet packages with the latest commits.

@jerry2007
Copy link

+1

@AndreiMisiukevich
Copy link

AndreiMisiukevich commented Sep 26, 2017

Correct "Additional info", @obache )

sqlite-net-pcl sqlite-net-pcl 1.4.118 instead of sqlite-net-pcl 1.14.118

I have the similar issue. But with winphone 8.1 (WinRt)

@obache
Copy link
Author

obache commented Sep 26, 2017

@AndreiMisiukevich Thanks and fixed.

@obache
Copy link
Author

obache commented Oct 9, 2017

It works well using .NET Standard instead of PCL. with Xamarin.Forms 2.4.0.282.

@deckertron9000
Copy link

@obache So it works on UWP if you use .NET Standard projects instead of PCL?

@obache
Copy link
Author

obache commented Oct 11, 2017

@deckertron9000 Yes, I've just upgraded my project to .Net Standard 1.3 project, and it works well even on UWP.

@lukealderton
Copy link

I upgraded the package within my project from 1.4.118 to 1.5.166-beta and this issue was no longer present.

@smedvedev
Copy link

When release with this fix is planned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants