This project has moved. For the latest updates, please go here.

Where has AddExportedObject gone?

Apr 16, 2009 at 2:56 PM
Hi there,

Would love to try out Preview 5, however CompositionBatch no longer has an AddExportedObject<T> method.  I'm currently using doing this when composing:


This is to allow me to import an ExportProvider when I need it.  How should I go about achieving this with the latest preview?

Apr 19, 2009 at 2:33 AM
While CompositionBatch itself does not contain an AddExportedObject<T> there is an extension method for it. The extension methods are in the root System.ComponentModel.Composition namespace so ensure you are including that in your file's using statements. If you cannot get the extension method to work you can always call the method directly on AttributedModelServices.