开发者

MEF Silently Stops Finding Exports in Deployment Catalog?

开发者 https://www.devze.com 2023-01-18 23:04 出处:网络
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 writ

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

精彩评论

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