visual studio - EF Core queries throw exceptions since VS2017 15.3 -
i updated vs 2017 15.3 , vs mac 7.1 , xamarin.android 7.4. since ef core queries not working anymore , app crashes exception system.platformnotsupportedexception.
the message is:
operation not supported on platform.
this stack trace when activate diagnostic logging:
[monodroid] unhandled exception: [monodroid] system.platformnotsupportedexception: operation not supported on platform. [monodroid] @ system.runtime.interopservices.marshal.iscomobject (system.object o) [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ microsoft.csharp.runtimebinder.binderhelper.iscomobject (system.object obj) [0x00003] in <0c600cab29754882aa1761854aaa8abf>:0 [monodroid] @ microsoft.csharp.runtimebinder.binderhelper.isdynamicallytypedruntimeproxy (system.dynamic.dynamicmetaobject argument, microsoft.csharp.runtimebinder.csharpargumentinfo info) [0x00011] in <0c600cab29754882aa1761854aaa8abf>:0 [monodroid] @ microsoft.csharp.runtimebinder.binderhelper.deduceargumentrestriction (system.int32 parameterindex, microsoft.csharp.runtimebinder.icsharpinvokeorinvokememberbinder callpayload, system.dynamic.dynamicmetaobject argument, microsoft.csharp.runtimebinder.csharpargumentinfo info) [0x00011] in <0c600cab29754882aa1761854aaa8abf>:0 [monodroid] @ microsoft.csharp.runtimebinder.binderhelper.bind (system.dynamic.dynamicmetaobjectbinder action, microsoft.csharp.runtimebinder.runtimebinder binder, system.dynamic.dynamicmetaobject[] args, system.collections.generic.ienumerable`1[t] arginfos, system.dynamic.dynamicmetaobject onbindingerror) [0x000a3] in <0c600cab29754882aa1761854aaa8abf>:0 [monodroid] @ microsoft.csharp.runtimebinder.csharpinvokememberbinder.fallbackinvokemember (system.dynamic.dynamicmetaobject target, system.dynamic.dynamicmetaobject[] args, system.dynamic.dynamicmetaobject errorsuggestion) [0x0000e] in <0c600cab29754882aa1761854aaa8abf>:0 [monodroid] @ system.dynamic.invokememberbinder.fallbackinvokemember (system.dynamic.dynamicmetaobject target, system.dynamic.dynamicmetaobject[] args) [0x00000] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ system.dynamic.dynamicmetaobject.bindinvokemember (system.dynamic.invokememberbinder binder, system.dynamic.dynamicmetaobject[] args) [0x0000b] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ system.dynamic.invokememberbinder.bind (system.dynamic.dynamicmetaobject target, system.dynamic.dynamicmetaobject[] args) [0x00016] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ system.dynamic.dynamicmetaobjectbinder.bind (system.object[] args, system.collections.objectmodel.readonlycollection`1[t] parameters, system.linq.expressions.labeltarget returnlabel) [0x000c6] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ system.runtime.compilerservices.callsitebinder.bindcore[t] (system.runtime.compilerservices.callsite`1[t] site, system.object[] args) [0x00019] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ system.dynamic.updatedelegates.updateandexecute2[t0,t1,tret] (system.runtime.compilerservices.callsite site, t0 arg0, t1 arg1) [0x000fc] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ microsoft.entityframeworkcore.storage.relationalsqlgenerationhelper.generateliteral (system.object value, microsoft.entityframeworkcore.storage.relationaltypemapping typemapping) [0x00086] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] @ microsoft.entityframeworkcore.query.sql.defaultquerysqlgenerator.visitconstant (system.linq.expressions.constantexpression expression) [0x0002a] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] @ system.linq.expressions.constantexpression.accept (system.linq.expressions.expressionvisitor visitor) [0x00000] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ system.linq.expressions.expressionvisitor.visit (system.linq.expressions.expression node) [0x00005] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ remotion.linq.parsing.throwingexpressionvisitor.visit (system.linq.expressions.expression expression) [0x0003f] in <0a52ab02a5054a9e94c0cd3993f4d33a>:0 [monodroid] @ microsoft.entityframeworkcore.query.sql.defaultquerysqlgenerator.visitbinary (system.linq.expressions.binaryexpression expression) [0x0012d] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] @ system.linq.expressions.binaryexpression.accept (system.linq.expressions.expressionvisitor visitor) [0x00000] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ system.linq.expressions.expressionvisitor.visit (system.linq.expressions.expression node) [0x00005] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ remotion.linq.parsing.throwingexpressionvisitor.visit (system.linq.expressions.expression expression) [0x0003f] in <0a52ab02a5054a9e94c0cd3993f4d33a>:0 [monodroid] @ microsoft.entityframeworkcore.query.sql.defaultquerysqlgenerator.visitselect (microsoft.entityframeworkcore.query.expressions.selectexpression selectexpression) [0x0015f] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] @ microsoft.entityframeworkcore.query.expressions.selectexpression.accept (system.linq.expressions.expressionvisitor visitor) [0x0001e] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] @ system.linq.expressions.expressionvisitor.visit (system.linq.expressions.expression node) [0x00005] in <b5bd9d990a0b4733885e90ca5ec6c0fb>:0 [monodroid] @ remotion.linq.parsing.throwingexpressionvisitor.visit (system.linq.expressions.expression expression) [0x0002c] in <0a52ab02a5054a9e94c0cd3993f4d33a>:0 [monodroid] @ microsoft.entityframeworkcore.query.sql.defaultquerysqlgenerator.generatesql (system.collections.generic.ireadonlydictionary`2[tkey,tvalue] parametervalues) [0x00043] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] @ microsoft.entityframeworkcore.query.internal.shapercommandcontext.getrelationalcommand (system.collections.generic.ireadonlydictionary`2[tkey,tvalue] parameters) [0x00025] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] @ microsoft.entityframeworkcore.query.internal.asyncqueryingenumerable+asyncenumerator+<bufferlessmovenext>d__9.movenext () [0x0041d] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter`1[tresult].getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ microsoft.entityframeworkcore.query.internal.asyncqueryingenumerable+asyncenumerator+<movenext>d__8.movenext () [0x00140] in <1ce4ae811dd94fe5a5e10e630f2f4c7a>:0 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter`1[tresult].getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ microsoft.entityframeworkcore.query.internal.asynclinqoperatorprovider+selectasyncenumerable`2+selectasyncenumerator+<movenext>d__4[tsource,tresult].movenext () [0x0006e] in <2645c1c7345546f5b968e91de81e2b12>:0 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter`1[tresult].getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ microsoft.entityframeworkcore.query.internal.asynclinqoperatorprovider+selectasyncenumerable`2+selectasyncenumerator+<movenext>d__4[tsource,tresult].movenext () [0x0006e] in <2645c1c7345546f5b968e91de81e2b12>:0 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter`1[tresult].getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ microsoft.entityframeworkcore.query.internal.asynclinqoperatorprovider+exceptioninterceptor`1+enumeratorexceptioninterceptor+<movenext>d__5[t].movenext () [0x0016e] in <2645c1c7345546f5b968e91de81e2b12>:0 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter`1[tresult].getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ microsoft.entityframeworkcore.entityframeworkqueryableextensions+<tolistasync>d__129`1[tsource].movenext () [0x000b7] in <2645c1c7345546f5b968e91de81e2b12>:0 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter`1[tresult].getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ connectcontacts.service.dataservices.contactdataservice+<getcontactsexceptme>d__4.movenext () [0x00038] in /users/npadrutt/documents/github/connectcontacts/connectcontacts/connectcontacts.service/dataservices/contactdataservice.cs:110 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter`1[tresult].getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ connectcontacts.business.viewmodels.contactlistviewmodel+<loaddata>d__27.movenext () [0x00067] in /users/npadrutt/documents/github/connectcontacts/connectcontacts/connectcontacts.business/viewmodels/contactlistviewmodel.cs:134 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess (system.threading.tasks.task task) [0x0003e] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification (system.threading.tasks.task task) [0x00028] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.validateend (system.threading.tasks.task task) [0x00008] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.taskawaiter.getresult () [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ connectcontacts.business.viewmodels.contactlistviewmodel+<viewappeared>d__26.movenext () [0x00020] in /users/npadrutt/documents/github/connectcontacts/connectcontacts/connectcontacts.business/viewmodels/contactlistviewmodel.cs:124 [monodroid] --- end of stack trace previous location exception thrown --- [monodroid] @ system.runtime.exceptionservices.exceptiondispatchinfo.throw () [0x0000c] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ system.runtime.compilerservices.asyncmethodbuildercore+<>c.<throwasync>b__6_0 (system.object state) [0x00000] in <183b200ee49746d48fc781625979428e>:0 [monodroid] @ android.app.synccontext+<>c__displayclass2_0.<post>b__0 () [0x00000] in <71828dd8fb5f4508815e23d6996c45c2>:0 [monodroid] @ java.lang.thread+runnableimplementor.run () [0x00008] in <71828dd8fb5f4508815e23d6996c45c2>:0 [monodroid] @ java.lang.irunnableinvoker.n_run (system.intptr jnienv, system.intptr native__this) [0x00008] in <71828dd8fb5f4508815e23d6996c45c2>:0 [monodroid] @ (wrapper dynamic-method) system.object:51155536-39dc-466e-a95f-dea6c3e2125b (intptr,intptr)
one of queries failes is:
var list = await contactrepository .getall() .where(x => x.isme) .tolistasync();
when remove clause works.
another solve when changed following:
query.where(x => x.infos.any()) .where(x => x.infos.any(e => e.infotype.tostring() .startswith("number", stringcomparison.ordinalignorecase)));
to:
query.where(x => x.infos.any(e => e.infotype.tostring() .startswith("number", stringcomparison.ordinalignorecase)));
i use ef core 1.1.2 , ef core sqlite 1.1.2.
since there update ef core 2.0 thought maybe fixable update. ef core supported xamarin.android 7.5 right not available. update not possible..
i talked other developer have similar isses. what's wrong here , how can fix that?
this issue fixed in vs 15.3.2
https://bugzilla.xamarin.com/show_bug.cgi?id=57919 https://bugzilla.xamarin.com/show_bug.cgi?id=58846
Comments
Post a Comment