3

Closed

Incompotable types with WP7

description

Hello.
I have an issue occured while using your library(Caliburn.Micro).
Interface IHandle<> defined as IHandle<in T> instead of IHandle<T>.
It causes app crash while runnig on WP7 devices or emulator in case of using types implementing that interface.
Also I found another "bad" interface IHandleWithCoroutine<>. It is defined in the same way and has the same issue.
To reproduce the error, you need to instantiate TaskController while using WP7 device or emulator. Another way: call typeof(IStorageMechanism).Assembly.GetTypes() and you will receive "ReflectionTypeLoadException".
If use WP8 device or emulator then all are well.

Looking forward for your help, Viacheslav.

file attachments

Closed Mar 22, 2013 at 8:56 PM by EisenbergEffect
Fixed.

comments

tibel wrote Mar 20, 2013 at 1:24 PM

Fixed in latest source.
Sorry for that problem (don't know why the compiler gives no error).

tibel wrote Mar 20, 2013 at 5:30 PM

In the meantime you can use your own IHandle interface (as a workaround):
public interface IHandleFix<TMessage> : IHandle {
    void Handle(TMessage message);
}

kayub wrote Mar 21, 2013 at 12:35 AM

Will this also fix the ReflectionTypeLoad in AppBootstrapper when you do:
_container = new PhoneContainer(RootFrame);

_container.RegisterPhoneServices();
I can't use the app on WP71 due to this error.

If it does fix it, will there be a hotfix shortly?

Altk wrote Mar 21, 2013 at 9:58 AM

Will this also fix the ReflectionTypeLoad in AppBootstrapper when you do:
_container = new PhoneContainer(RootFrame);
_container.RegisterPhoneServices();
I can't use the app on WP71 due to this error.
If it does fix it, will there be a hotfix shortly?
You can compile sources 1.5.0 version yourself with my fix, and this will resolve this error.
Fixed in latest source.
Sorry for that problem (don't know why the compiler gives no error).
Thanks for the quick fix. I will be waiting new version with hotfix.

tibel wrote Mar 21, 2013 at 7:27 PM

I have now tested with WP71 emulator and the project I added works without any issues.
So I can't reproduce your issue in the emulator.
Also no problems with IHandle<in T>.

tibel wrote Mar 21, 2013 at 7:39 PM

Ahh, in Emulator 7.1 it crashes. So forget my last post.
No issues when using latest CM source.