У меня есть это приложение Xamarin, которое отлично работает в режиме отладки (эмулятор и устройство). В режиме выпуска (устройство) приложение было хорошо до представления с помощью действия, которое является проекционным запросом. Я удалил конфигурацию компоновщика и оптимизацию кода. Я сделал несколько тестов, и приложение не работает с основными параметрами проекции/фильтрации:
Не работает (исходный запрос. Работает в режиме отладки, но не в режиме выпуска)
var query = new EntityQuery<TransportReceipt>("GetAllByCustomer");
query = query.WithParameter("customerId", customerId);
Работает
var query = new EntityQuery<TransportReceipt>("GetAll");
Не работает
var query = new EntityQuery<TransportReceipt>("GetAll").Where(o => o.creationDate > DateTime.Now.AddMonths(-2));
Не работает
var query = new EntityQuery<TransportReceipt>("GetAll").Expand(o => o.transportReceiptAttachments);
На изображении показана копия журнала устройства.
Time Device Name Type PID Tag Message
08-10 09:47:51.520 Samsung SM-J500M Error 967 AndroidRuntime Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
... 1 more
08-10 09:47:51.520 Samsung SM-J500M Error 967 AndroidRuntime Caused by: android.runtime.JavaProxyThrowable: System.TypeInitializationException: The type initializer for 'System.Data.Services.Client.TypeSystem' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
08-10 09:47:51.520 Samsung SM-J500M Error 967 AndroidRuntime FATAL EXCEPTION: main
08-10 09:47:51.520 Samsung SM-J500M Error 967 AndroidRuntime Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) [0x00006] in <27d869918d7c4fc687b412573db27626>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Insert (TKey key, TValue value, System.Boolean add) [0x00008] in <27d869918d7c4fc687b412573db27626>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <27d869918d7c4fc687b412573db27626>:0
at System.Data.Services.Client.TypeSystem..cctor () [0x0061b] in <deb764142256426392349c18ced9aa88>:0
--- End of inner exception stack trace ---
at System.Data.Services.Client.ResourceBinder+PatternRules.MatchNonPrivateReadableProperty (System.Linq.Expressions.Expression e, System.Reflection.PropertyInfo& propInfo, System.Linq.Expressions.Expression& target) [0x00033] in <deb764142256426392349c18ced9aa88>:0
WCF
? - person Eren Shen   schedule 15.08.2017