Bug 22522 - [linker] System.Data.Linq.DataContext ---> System.InvalidOperationException: Sequence contains no matching element
Summary: [linker] System.Data.Linq.DataContext ---> System.InvalidOperationException: ...
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: General ()
Version: 3.8.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2014-08-29 18:02 UTC by Anton
Modified: 2014-09-01 05:27 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Anton 2014-08-29 18:02:00 UTC
App crashes in release build with link behavior "Link ..."
code:
var conn = new SqliteConnection("DbLinqProvider=Sqlite;Data Source=path_to_db");
var db = new DataContext(conn); //crash

log:
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Data.Linq.DataContext ---> System.InvalidOperationException: Sequence contains no matching element
  at System.Linq.Enumerable.First[MethodInfo] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.First[MethodInfo] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0 
  at System.Data.Linq.DataContext..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
Comment 1 Marek Safar 2014-09-01 05:27:35 UTC
Fixed in master. Thought I don't think System.Data.Linq is linker friendly