Issues with MEF and WCF

    General discussion

  • Hi:

    I have a simple MEF framework. The total number of projects of the framwork are...

    1. The actual widget (MEF.Extension)

    2. The silvelright host (MEF.Host)

    3. The web/server project simple loading MEF.Host)

    Now, MEF.Extensions is doing a [Export] of its one UserControl. ON the MEF.Host site I am importing that control. Here is some code...


        public partial class BubbleUserControl : UserControl


    namespace EmployeeBubbles.Host.ViewModels
        public class MainViewModelBase : ViewModelBase
            public BubbleUserControl BubbleUserControl { get; set; }
            public MainViewModelBase()
                this.BubbleUserControl = new BubbleUserControl("E2177");

    So far so good. Now compilation errors, but when I run the application I get an error. MEF.Extensions is referencing a WCF service to pull data from database. In run-time I get an error sayng that "ServiceReference.ClientConfig is not part of .xap application package." What am I doing wrong?




    Monday, October 11, 2010 3:14 PM

All replies

  • Your main application (Silverlight host) doesn't have the ServiceReference.ClientConfig file referenced in the project? If not, add a copy (or a linked file from the MEF.Extension project) to it and it should start working.


    Monday, October 11, 2010 5:41 PM