开发者

MEF Silently Stops Finding Exports in Deployment Catalog?

When my Deployment Catalog contains System.Windows.Controls.Layout.Toolkit.dll MEF 'breaks'... All I'm doing is adding a reference to this file in my project and the following diagnostics code writes nothing to the VS Output Window:

this.CompositionContainer.ExportsChanged += (s, args) =>
{
    var o = args.AddedExports;
    o.ToList().ForEach(export =>
        System.Diagnostics.Debug
            .WriteLine("MEF export: " + export.ToString()));
};

...when the referen开发者_JAVA百科ce is removed the ExportsChanged event fires. Is this problem my "special" problem or can someone else on Earth reproduce this problem?


Make sure you are subscribing to the DownloadCompleted event of the DeploymentCatalog. In your event handler, check the Error property of the EventArgs, and it will probably tell you what the problem is.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜