I'm working an application that is based on Silverlight 5. It's framework is MVVM and implemented by Prism. I'm using silverlight 5 toolkit too.
In one of my views I using wrapPanel and DateTimePicker from toolkit.
<navigation:Page x:Class="PIPM2.SupervisionSubSystem.Module.View.TestView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
d:DesignWidth="640" d:DesignHeight="480"
Title="TestView Page" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:my="clr-namespace:Silverlight.Controls;assembly=Silverlight.Controls" xmlns:my1="clr-namespace:Silverlight.Controls.Primitives;assembly=Silverlight.Controls">
<Grid>
<sdk:DatePicker />
<toolkit:WrapPanel >
</toolkit:WrapPanel>
</Grid>
</navigation:Page>
This sample buid successed but at runtime in InitializeComponent() method I got this Error =>
Could not load file or assembly 'System.Windows.Controls.Toolkit, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The requested assembly version conflicts with what is already bound in the app domain or specified in the manifest. (Exception from HRESULT: 0x80131053)
If I delete one of controls, wrapPanel or DatePicker the Error do not occur again.
How can I solve this problem.
What exact version of System.Windows.Controls.Toolkit are you currently referencing? Do you have multiple projects? If so, do different projects reference different versions of that same assembly?
If you want to know for sure which version of the DLL you are getting, just go to your .XAP file and rename it to .ZIP (XAP files are really ZIP files). Now look in the ZIP file and see exactly which DLL you have and what the version number is.
User contributions licensed under CC BY-SA 3.0