Click here to Skip to main content
15,918,742 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi I am working an application that based on Silverlight 5.
Its framework is MVVM and implemented by Prism.
I am using silverlight 5 toolkit too.

in one of my views I using wrapPanel and DateTimePicker from toolkit.




XML
<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 my Error do not occur again.

please help me.
How can I solve this problem.

thanks a lot.
Posted

1 solution

What about this:
On your References folder, search for System.Windows.Controls.Toolkit, right click on it, then go to properties.
Set Local Copy to True

After this step rebuild your project. Run it!

Hope its helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900