首页 文章

无法使用prism4在silverlight 5中加载文件或程序集'System.Windows.Controls'

提问于
浏览
4

我正在使用prism 4创建一个应用程序silverlight 5,当我使用UnityBootstrapper运行引导程序时,我有下一个错误:

无法加载文件或程序集'System.Windows.Controls,Version = 2.0.5.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35'或其依赖项之一 . 该系统找不到指定的文件 .

ConfigureRegionAdapterMappings方法中的此错误:

protected override RegionAdapterMappings ConfigureRegionAdapterMappings()
    {
        // Call base method
        var mappings = base.ConfigureRegionAdapterMappings(); <-- I get the error here!
        if (mappings == null) return null;

        // Add custom mappings

        // Set return value
        return mappings;
    }

奇怪的是,如果我将我的项目更改为silverlight 4,那么它工作正常(?) . 请你帮助我好吗?

谢谢!

1 回答

  • 6

    这是因为prism 4库的目标是silverlight 4.你必须下载prism的源代码并且必须将所有silverlight项目引用更改为silverlight5并重新编译它然后设置对新二进制文件的引用

相关问题