次のいくつかの手順で、これを達成できると思います。
1) コントラクト (インターフェイス) を使用して共通のクラス ライブラリを作成する
[ServiceContract]
public interface ISimpleService
{
}
2) WCF サービスの実装用に別のクラス ライブラリを作成し、WCF サービス クラスを MEF の export 属性でマークします。
[Export(typeof(ISimpleService))]
public class SimpleService: ISimpleService
{
}
3) 次に、ホスト アプリケーション (この場合は ASP.NET MVC) で、たとえばアセンブリ カタログに基づいて MEF コンポジション コンテナーを作成します。
protected void Application_Start()
{
var catalog = new AssemblyCatalog(...);
var container = new CompositionContainer(catalog);
container.ComposeParts(this);
}
4) 次に、MEF を使用してサービスの実装をインポートできます。
[Import]
public ISimpleService SimpleService { get; set; }
5) 次に、そのサービス実装の WCF サービス ホストを作成できます。
var serviceHost = new ServiceHost(SimpleService, ...);
お役に立てれば。