jbe2277/waf

IFileDialogService can't import

Sunng210 opened this issue · 1 comments

I write a demo to try WAF, when I try to use FileDialog, I used IFileDialogService, but it throw an exception, it says can't find the export ContractName="System.Waf.Applications.Services.IFileDialogService".

This is my import code.
[ImportingConstructor]
public ShellViewModel(IShellView view, IFileDialogService fileDialogService)
: base(view)
{
exitCommand = new DelegateCommand(Close);
fileDialogService = this.fileDialogService;
}

Thanks.

This error comes when the System.Waf.Wpf assembly is not registered via MEF. Add the following line:

catalog.Catalogs.Add(new AssemblyCatalog(typeof(IMessageService).Assembly));