Question

I just upgrade my solution from 3.0.9 to 3.0.13. All seems to work well. Much thanks to the MvvmCross team for their continued effort on this great framework.

I am running into a slight problem replacing the now depreciated IMvxGeoLocationWatcher with IMvxLocationWatcher. These services that rely on constructor injection to get an instance of IMvxLocationWatcher are now throwing System.TypeLoadException as shown below:

 System.TypeLoadException: Could not load type 'MyApp.Core.ViewModels.ProgressListViewModel' from assembly 'MyApp.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
10-17 02:56:24.447 E/mono    ( 2833):   at (wrapper managed-to-native) System.Type:type_is_assignable_from (System.Type,System.Type)
10-17 02:56:24.447 E/mono    ( 2833):   at System.Type.IsAssignableFrom (System.Type c) [0x00000] in <filename unknown>:0 
10-17 02:56:24.447 E/mono    ( 2833):   at Cirrious.MvvmCross.ViewModels.MvxViewModelByNameLookup.<BuildViewModelLookup>b__5 (<>f__AnonymousType3`2 <>h__TransparentIdentifier0) [0x00000] in <filename unknown>:0 
The program 'Mono' has exited with code 0 (0x0).
10-17 02:56:24.447 E/mono    ( 2833):   at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator33`1[<>f__AnonymousType3`2[System.Reflection.Assembly,System.Type]].MoveNext () [0x00000] in <filename unknown>:0 

What am I missing?

Thanks again.

Was it helpful?

Solution

I just tested with https://github.com/MvvmCross/NPlus1DaysOfMvvmCross/tree/master/N-08-Location

It updated and loads fine.

A TypeLoadException suggests that perhaps you have a mixture of Assembly versions present. Ensure everything = core and UI - is updated to 3.0.13 and that everything is rebuilt. If that fails, then try using Reflector (or similar) in order to analyse what is wrong with your built assemblies.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top