Cannot create instance of "WpfPanel"

Jul 3, 2013 at 4:38 PM
Edited Jul 4, 2013 at 12:23 PM
Guys,

I am using IAD in our project. I have a xaml when when i try to open in design view, it throws error as below

FileNotFoundException was thrown on "WpfPanel": Cannot create an instance of "WpfPanel". Click here to show details

On click it shows as below with header as "And Unhandled Eception has occured"

Could not load file or assembly 'Microsoft.Uii.Practices.CompositeUI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
at Microsoft.Uii.Desktop.UI.Controls.Wpf.WpfPanel.InitializeControls()
at Microsoft.Uii.Desktop.UI.Controls.Wpf.WpfPanel..ctor()


I checked the 'Microsoft.Uii.Practices.CompositeUI dll which is added in references and it has version has 2.0.0.0. But i dont know where do i get 1.0.0.0 as mentioned in the error. i cant find it anywhere.

When i look in XAML code, there are the lines which i have in my file and lines like the one highlighted below with **** is creating the issue

<Window
x:Class="Microsoft.Crm.Accelerator.Cca.WpfDesktop.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:UserControls="clr-namespace:xxxxxxxx.Midnight.Wpf.Controls;assembly=xxxxxxxx.Midnight.Wpf.Controls"
xmlns:Wpf="clr-namespace:Microsoft.Uii.Desktop.UI.Controls.Wpf;assembly=Microsoft.Uii.Desktop.UI.Controls.Wpf"
              • <Wpf:WpfPanel>
Please do you have any ideas how to resolve this issue?

regards,
Sham
Jul 8, 2013 at 2:00 PM
Check your Project settings. Is the Target Framework set to .NET Framework 4 ??
Jul 17, 2013 at 8:18 AM
ndi wrote:
Check your Project settings. Is the Target Framework set to .NET Framework 4 ??
Yes ndi, I do. Thanks for replying. I have checked all projects which are part of solution and every one has .net framework4 set. I am not sure if Microsoft.Uii.Practices.CompositeUI, Version=1.0.0.0 is related to .net framework4 but yes the version actually added to references is 2.0.0.0.
Jul 17, 2013 at 9:39 AM
its been a while since Setting up the IAD Reference Project. In our Project the DLL is also referenced with Version= 2.0.0.0. .. we had struggle building the DLL by our own (according to the deployment guide) so we took this Version: http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-16-33-41/Microsoft.Practices.CompositeUI.Windows.dll.zip

as recommended here: http://blogs.msdn.com/b/ukcrm/archive/2011/05/11/getting-started-with-cca-for-crm-2011.aspx

maybe you should give that a try