4

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 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;
    }

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

Thanks!

iCollect.it Ltd
  • 92,391
  • 25
  • 181
  • 202
  • This month (Januar 2012) will Prism 4.1 be released, which includes some bug fixes and support for Silverlight 5. – Jehof Jan 20 '12 at 10:44

1 Answers1

6

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

yrahman
  • 960
  • 5
  • 15
  • 33
  • Getting Prism from NuGet is also possible, but (at least as to date July 2012) you will need to remove automatically added Prism References (beacuse it reference SL4) and add references again but using assemblies in \packages\Prism.4.1.0.0\lib\SL5 – SalvadorGomez Jul 26 '12 at 17:41