This project is read-only.

Bug in WPF/CAB Layer?

Nov 12, 2007 at 2:21 AM
Module loader does not seem to be working. Or is there some other way to load modules other than the ProfileCatalog.xml file? One of the key, if not the key value proposition in CAB is the abitility to provide very loose coupling between modules. I am not sure how usefule WPF/CAB layer is if the module loading plumbing has to be done outside the ProfileCatalog.xml paradigm? Perhaps I am missing something here.
Nov 12, 2007 at 9:24 AM

Can you elaborate? It definitely works - what problems are you having?

Nov 12, 2007 at 3:14 PM
Kent, thanks for replying and of course making available the WPFCAB layer.

I have a WPF project The "Shell" with references to SCSFContrib, ObjectBuilder, & CompUI. On its own there is no problem; it compiles and shows the main window with WPF workspaces/smartparts. I then add a class library with a WPF user control to the solution as a module, set it to build in the "Shell's " bin folder, add a ProfileCatalog.xml file in the Shell project, copy always. The module has a class derived from ModuleInit.

But the thing just doesn't load. I tried peering into the debug output and list the items collection. The module is not there. I tried listing a number of dummy dlls as modules in the ProfileCatalog.xml just to see if it throws an exception if it doesn't find these dlls. No show at all. It appears to me that for some reason the ProfileCatalog.xml file is not being read although I can see the ModuleLoaderService itself in the services collection of the root WorkItem.

Now, this happens while using the "pure" WPF/CAB layer, with a WPF shell. The migrated model as in BankTeller does not have this problem. Please let me know if you need any more details. sm.

Saw the Kew gardens & the Serpentine 10 years ago. Beautiful place.
Nov 12, 2007 at 9:17 PM
I just put together a quick test and it worked OK. However, one thing you might want to check: is the ProfileCatalog.xml definitely being copied to the output directory? When I added the XML file VS made it a Resource. You have to change that to Content as well as changing the action to Copy always (or Copy if newer), otherwise it doesn't copy it (maybe they should have called the option Copy nearly always)

If you still can't get it working let me know and I'll email you my solution.

Nov 13, 2007 at 3:53 AM
Kent, it worked! I changed the ProfileCatalog.xml to be a content; it was there as a resource. This is exciting.

I am bent on using the WPF/CAB layer in a "green" field scenario (whatever that means) for a massive information managment framework. So I am going to take your WPF/CAB layer re-write through the paces.

Thanks very much. sm.
Nov 15, 2007 at 10:25 PM
Kent, wd. you be kind enough to send me your solution. I am having trouble loading a WPF view from a module. Thanks. sm.