This project is read-only.

DesignTime IComposer

Sep 2, 2010 at 1:35 PM

Hi marlon,

On "MEFedMVVM Part 4" article you write, that you work on that behavior. My question is, what is your actual state with DesignTime IComposer.

The problem is, that designtime data not working for me, because of versioned exports.

"More than one export was found that matches the constraint ..."


Sep 2, 2010 at 1:54 PM

what do you mean by versioned exports?

Sep 2, 2010 at 2:26 PM
Edited Sep 2, 2010 at 2:30 PM

I use Cinch and I have e.g. my own IUIVizualizerService, but Cinch too. So I use my own Catalog, to filter same exports with lower Version out.

Also I will give me and other the possibility to simple "override" some services or any other exports by writing new one with higher version.

Sep 2, 2010 at 2:50 PM

ow... mmm.... in that case yes there will be an issue... why don't you mark the services as Runtime and then just have one as design time?

[ExportService(ServiceType.Runtime, typeof(IUIVizualizerService))]


and for the design time

[ExportService(ServiceType.DesignTime, typeof(IUIVizualizerService))]

Sep 2, 2010 at 3:41 PM

Hm, good idea for services, but what's with ViewModels and other Exports.

e.g. for toolbar and menuitem I use default New, Save, Open and so on Command and inject this commands per Import/Export Attribute. This is implemented in my base application platform. Now I will write an application and need other behavior on e.g. New command. So I write new Command and export this with newer version.  It's not a Service, I need contract name and type on Export attributes.

PS: I tried to set ServiceType to Runtime on my Exports, but I get this

The export 'Cinch.WPFUIVisualizerService (ContractName="Cinch.IUIVisualizerService")' is not assignable to type 'Cinch.IUIVisualizerService'. 

Do you know what the problem is?

Sep 3, 2010 at 11:53 AM

wouldn't the actual logic be implemented in the services?

with regard to the error looks like you have multiple modules loaded in blend... try restarting it and see what happens