我正在使用 Silverlight 4 和 Prism 4 进行开发。
我也使用 Unity 作为我的注入容器。
我正在尝试从 xaml 创建模块目录,但我收到此错误“ IModuleCatalog 不包含 CreateFromXaml ... 的定义”。
我的代码片段是:
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.ServiceLocation;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.MefExtensions;
namespace MyModularityProject {
    public class MyBootStrapper : UnityBootstrapper {
        protected override DependencyObject CreateShell() {
            return ServiceLocator.Current.GetInstance<Shell>();
        }
        protected override void InitializeShell() {
            base.InitializeShell();
            Application.Current.RootVisual = (UIElement)Shell;
        }
        protected override IModuleCatalog CreateModuleCatalog() {
            // This is the isntruction that doesn't compile
            return ModuleCatalog.CreateFromXaml(new 
                Uri("/MyProject.Silverlight;component/ModulesCatalog.xaml",
                    UriKind.Relative));
        }
    }
}
我在这里能错过什么?