efcore: Xamarin Forms iOS build error MT5214: Native linking failed, undefined symbol: _sqlite3_key_v2.

Describe the bug After updating Microsoft.Data.Sqlite to version 3.0.0 I get following build errors for Xamarin Forms iOS project:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): error MT5214: Native linking failed, undefined symbol: _sqlite3_key_v2. This symbol was referenced by the managed member SQLitePCL.SQLite3Provider_internal/NativeMethods.sqlite3_key_v2. Please verify that all the necessary frameworks have been referenced and native libraries linked. 2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(795,3): error MT5214: Native linking failed, undefined symbol: _sqlite3_rekey_v2. This symbol was referenced by the managed member SQLitePCL.SQLite3Provider_internal/NativeMethods.sqlite3_rekey_v2. Please verify that all the necessary frameworks have been referenced and native libraries linked.

To Reproduce

Build Xamarin Forms iOS project.

Additional context

Microsoft.Data.Sqlite version: 3.0.0 Target framework: .NET Standard 2.0

Development environment:

Windows 10 1903 Build: 18362.418

Microsoft Visual Studio Enterprise 2017 Version 15.9.16 VisualStudio.15.Release/15.9.16+28307.858 Microsoft .NET Framework Version 4.8.03752

Xamarin Forms version: 4.2.0.848062 Xcode version: 10(10E125)

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

@bricelam will update the SQLite package”

Which I assume will be after I ship 2.0.2 (non-pre).

Which should be next week. I just wanted to verify a couple more things first.

@bricelam

OK, 2.0.2 has been pushed up to nuget.org. Sorry I dropped the ball on this. How embarrassing.

There were no changes since the last -pre.

I re-reviewed all the relevant issues, re-read all the diffs since 2.0.1, and re-ran all the tests. It all looks solid. Let me know if you encounter any problems.

I just pushed up version 2.0.2-pre20191018090318 to nuget.org, which contains a fix for this problem.

Wait, never mind. I think I found the problem. And it’s my fault. Fix pending.