findDispatcherScheduler does not find DispatcherScheduler in SL

81 views
Skip to first unread message

Lukas Cenovsky

unread,
Jun 21, 2011, 6:33:14 AM6/21/11
to ReactiveUI mailing list
Hi,
I have upgraded to the latest ReactiveUI 2.3.2, made all necessary changes (namespaces, references) but I am unable to fix one error.

In Silverlight, the following part always ends up always with result = null.

        internal static IScheduler findDispatcherScheduler()
        {
            Type result = null;
            try {
                result = Type.GetType("System.Reactive.Concurrency.DispatcherScheduler, System.Reactive.Windows.Threading"true);
            } catch {
            }

I have proper reference to System.Reactive.Windows.Threading.dll in my project and it is in my .xap file but the following exception is always raised:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Reactive.Windows.Threading, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Reactive.Windows.Threading, Culture=neutral, PublicKeyToken=null'
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at ReactiveUI.RxApp.findDispatcherScheduler()}    System.Exception {System.IO.FileNotFoundException


Any idea why and how to fix it?

The simplest way to reproduce it is to create empty SL project and try to instantiate any ReactiveUI class (i.e. ReactiveCommand) so RxApp is going to be called.

--
-- Lukáš

Lukas Cenovsky

unread,
Jun 21, 2011, 8:58:33 AM6/21/11
to reacti...@googlegroups.com
OK, after googling I have found Silverlight needs fully qualified assembly name:

result = Type.GetType("System.Reactive.Concurrency.DispatcherScheduler, System.Reactive.Windows.Threading, Version=1.1.10605.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"true);

Paul, can you fix it, please.

--
-- Lukáš

Paul Betts

unread,
Jun 21, 2011, 12:20:44 PM6/21/11
to reacti...@googlegroups.com
Ack! I'll take a look at it ASAP. Sorry about that - Silverlight and WP7 are the thorns 

-- 
Paul Betts <pa...@paulbetts.org>

Reply all
Reply to author
Forward
0 new messages