You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile with "Don't link assemblies", everything works as expected, but when I select "Link SDK Assemblies only", it fails at runtime with the stack trace below. I am using mtouch arguments "--linkskip=System.Core", also tried with System.Linq and System.Linq.Expressions.
I noticed the culprit is the != check in the mapping expression; if I remove it, the error disappears.
I will workaround the error by mapping in the constructor, but this still seems like a bug that could be fixed.
Stack trace:
Mar 5 08:52:22 iPhone ECCMobileiOS[238] <Warning>: mvx:Error: 14,54 Unhandled exception: System.TypeInitializationException: An exception was thrown by the type initializer for ECC.Mobile.Core.Models.ShopItemViewModel ---> System.NotImplementedException: The requested feature is not implemented.
at Microsoft.Scripting.Interpreter.NotEqualInstruction.Create (System.Type type) [0x001a5] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Instructions/NotEqualInstruction.cs:159
at Microsoft.Scripting.Interpreter.InstructionList.EmitNotEqual (System.Type type, Boolean liftedResult) [0x00000] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Instructions/InstructionList.cs:705
at Microsoft.Scripting.Interpreter.LightCompiler.CompileNotEqual (System.Linq.Expressions.Expression left, System.Linq.Expressions.Expression right, Boolean liftedResult) [0x0000e] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:611
at Microsoft.Scripting.Interpreter.LightCompiler.CompileBinaryExpression (System.Linq.Expressions.Expression expr) [0x0014e] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:573
at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x0032b] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1671
at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729
at Microsoft.Scripting.Interpreter.LightCompiler.CompileConditionalExpression (System.Linq.Expressions.Expression expr, Boolean asVoid) [0x00007] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:818
at Microsoft.Scripting.Interpreter.LightCompiler.CompileNoLabelPush (System.Linq.Expressions.Expression expr) [0x001d2] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1644
at Microsoft.Scripting.Interpreter.LightCompiler.Compile (System.Linq.Expressions.Expression expr) [0x00008] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:1729
at Microsoft.Scripting.Interpreter.LightCompiler.CompileTop (System.Linq.Expressions.LambdaExpression node) [0x00055] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/LightCompiler.cs:221
at Microsoft.Scripting.Generation.CompilerHelpers.LightCompile (System.Linq.Expressions.LambdaExpression lambda) [0x00000] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.6.2.26/src/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Generation/CompilerHelpers.cs:619
at System.Linq.Expressions.Compiler.LambdaCompiler.Compile (System.Linq.Expressions.LambdaExpression lambda, System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator) [0x00000] in <filename unknown>:0
at System.Linq.Expressions.Expression`1[System.Func`2[ECC.Common.Models.ShopItem,System.String]].Compile () [0x00000] in <filename unknown>:0
at AutoMapper.PropertyMap.SetCustomValueResolverExpression[ShopItem,String] (System.Linq.Expressions.Expression`1 sourceMember) [0x00000] in <filename unknown>:0
at AutoMapper.MappingExpression`2[ECC.Common.Models.ShopItem,ECC.Mobile.Core.Models.ShopItemViewModel].MapFrom[String] (System.Linq.Expressions.Expression`1 sourceMember) [0x00000] in <filename unknown>:0
at ECC.Common.Extensions.MappingExtensions+<MapMember>c__AnonStorey0`3[ECC.Common.Models.ShopItem,ECC.Mobile.Core.Models.ShopItemViewModel,System.String].<>m__0 (IMemberConfigurationExpression`1 x) [0x00000] in <filename unknown>:0
at AutoMapper.MappingExpression`2[ECC.Common.Models.ShopItem,ECC.Mobile.Core.Models.ShopItemViewModel].ForDestinationMember (IMemberAccessor destinationProperty, System.Action`1 memberOptions) [0x00000] in <filename unknown>:0
at AutoMapper.MappingExpression`2[ECC.Common.Models.ShopItem,ECC.Mobile.Core.Models.ShopItemViewModel].ForMember (System.Linq.Expressions.Expression`1 destinationMember, System.Action`1 memberOptions) [0x00000] in <filename unknown>:0
at ECC.Common.Extensions.MappingExtensions.MapMember[ShopItem,ShopItemViewModel,String] (IMappingExpression`2 expression, System.Linq.Expressions.Expression`1 destinationMember, System.Linq.Expressions.Expression`1 sourceMember) [0x00000] in <filename unknown>:0
at ECC.Mobile.Core.Models.ShopItemViewModel..cctor () [0x00102] in /Users/geirsagberg/Projects/ConsumerCompanion/ECC.Mobile.Core/Models/ShopItemViewModel.cs:37
--- End of inner exception stack trace ---
at ECC.Mobile.Core.ViewModels.LocationViewModel+<CreateShopModules>c__Iterator3.<>m__0 (ECC.Common.Models.ShopItem i) [0x00001] in /Users/geirsagberg/Projects/ConsumerCompanion/ECC.Mobile.Core/ViewModels/LocationViewModel.cs:79
at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[ECC.Common.Models.ShopItem,ECC.Mobile.Core.Models.ShopItemViewModel].MoveNext () [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[ECC.Mobile.Core.Models.ShopItemViewModel].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[ECC.Mobile.Core.Models.ShopItemViewModel]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.ToList[ShopItemViewModel] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at ECC.Mobile.Core.ViewModels.LocationViewModel+<CreateShopModules>c__Iterator3.MoveNext () [0x00063] in /Users/geirsagberg/Projects/ConsumerCompanion/ECC.Mobile.Core/ViewModels/LocationViewModel.cs:79
at System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[ECC.Mobile.Core.Models.ContentModule,ECC.Mobile.Core.Contracts.IContentViewModel].MoveNext () [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[ECC.Mobile.Core.Contracts.IContentViewModel].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0
at System.Collections.Generic.List`1[ECC.Mobile.Core.Contracts.IContentViewModel]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0
at System.Linq.Enumerable.ToList[IContentViewModel] (IEnumerable`1 source) [0x00000] in <filename unknown>:0
at ECC.Mobile.Core.ViewModels.LocationViewModel+<Init>c__async0.MoveNext () [0x00072] in /Users/geirsagberg/Projects/ConsumerCompanion/ECC.Mobile.Core/ViewModels/LocationViewModel.cs:40
The text was updated successfully, but these errors were encountered:
I have the following code:
When I compile with "Don't link assemblies", everything works as expected, but when I select "Link SDK Assemblies only", it fails at runtime with the stack trace below. I am using mtouch arguments "--linkskip=System.Core", also tried with System.Linq and System.Linq.Expressions.
I noticed the culprit is the
!=
check in the mapping expression; if I remove it, the error disappears.I will workaround the error by mapping in the constructor, but this still seems like a bug that could be fixed.
Stack trace:
The text was updated successfully, but these errors were encountered: