开发者

Could not load file or assembly 'System.Windows.Controls' in silverlight 5 using prism4

开发者 https://www.devze.com 2023-04-09 00:11 出处:网络
I\'m creating an application silverlight 5 using prism 4 and when I\'m running the bootstrapper using UnityBootstrapper then I have the next error:

I'm creating an application silverlight 5 using prism 4 and when I'm running the bootstrapper using UnityBootstrapper then I have the next error:

Could not load file or assembly 'System.Windows.Controls, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

This error in the ConfigureRegionAdapterMappings method:

    protected override RegionAdapterMappings ConfigureRe开发者_C百科gionAdapterMappings()
    {
        // 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;
    }

The strange thing is if I change my project to silverlight 4 then it is working fine (?). Could you please help me?

Thanks!


this is because prism 4 libraries are targeting silverlight 4. you have to download the source code of prism and have to change all silverlight project references to silverlight5 and the recompile it and then set references to new binaries

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号