Build 48484 Does not seem to work in SL4

Jul 16, 2010 at 4:09 PM

It appears that build 48484 does not work in SL4.  It appears to work fine in WPF.  I attempted to run your SL4Demo and received the below error.  I then created a new project adding the Cinch and MeffedMVVM libraries and only added the CinchBootStrapper line to the app.xaml.cs.  I compiled and ran the solution and received the exact same error.

 

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)
Timestamp: Fri, 16 Jul 2010 16:08:19 UTC


Message: Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.InvalidOperationException: Bootstrapper.Initialise() failed ---> System.InvalidOperationException: ChildWindowResolver is unable to ResolveChildWindowLookups based on current parameters ---> System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_InnerCatalog()
   at System.ComponentModel.Composition.Hosting.AssemblyCatalog.get_Parts()
   at lambda_method(Closure , ComposablePartCatalog )
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.ComponentModel.Composition.Primitives.ComposablePartCatalog.GetExports(ImportDefinition definition)
   at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at MEFedMVVM.ViewModelLocator.MEFedMVVMExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.AggregateExportProvider.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExports(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.CompositionContainer.GetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.TryGetExportsCore(ImportDefinition definition, AtomicComposition atomicComposition, IEnumerable`1& exports)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExports(ImportDefinition definition, AtomicComposition atomicComposition)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportsCore(Type type, Type metadataViewType, String contractName, ImportCardinality cardinality)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExportCore[T](String contractName)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExport[T](String contractName)
   at System.ComponentModel.Composition.Hosting.ExportProvider.GetExport[T]()
   at Cinch.ChildWindowResolver.ResolveChildWindowLookups(IEnumerable`1 assembliesToExamine)
   --- End of inner exception stack trace ---
   at Cinch.ChildWindowResolver.ResolveChildWindowLookups(IEnumerable`1 assembliesToExamine)
   at Cinch.CinchBootStrapper.Initialise(IEnumerable`1 assembliesToExamine)
   --- End of inner exception stack trace ---
   at Cinch.CinchBootStrapper.Initialise(IEnumerable`1 assembliesToExamine)
   at CinchV2DemoSL.App..ctor()    

Line: 54
Char: 13
Code: 0
URI: file:///C:/Code/CinchFrameworkMVVM/cinch/V2%20(VS2010%20WPF%20and%20SL)/SL4_Demo/SL4_Demo/CinchV2DemoSL/Bin/Debug/CinchV2DemoSLTestPage.html

 

Coordinator
Jul 19, 2010 at 12:46 PM

I have fixed that now, but SVN went wrong on Saturday 17/07/2010, so will be fixing it tonight. Grrr

Jul 4, 2011 at 5:27 AM

I have started receiving this error in my project all of a sudden. It's been 3 month since I touched the code, but went to make some modifications today and experienced the above issue. Any idea what I've done wrong to receive this error?

 

Cheers

 

JT

Coordinator
Jul 4, 2011 at 3:43 PM

To be honest I have not changed that code at all so no idea what could be causing it. Could be something to do with Permissions + Reflection. The childwindow resolver just add references into a Dictinary behind the scenes anyway, do you can manually do that instead.

 

Here is relevant code

IChildWindowService childWindowService =  ViewModelRepository.Instance.Resolver.Container.GetExport<IChildWindowService>().Value;

childWindowService.Register("someChildWindowName", Type of Childwindow);