This project has moved and is read-only. For the latest updates, please go here.

Problem loading WPFToolkit.Extended.dll

Aug 10, 2011 at 3:24 PM

I am trying to use the MaskedTextBox control on a WPF view and am receiving the following error when trying to open the view in my app:

- Could not load file or assembly 'WPFToolkit.Extended, Version=, Culture=neutral, PublicKeyToken=3e4669d2f30244f4' or one of its dependencies. The system cannot find the file specified.

I checked the bin directory and the dll is in the bin\debug directory.

In order to use the toolkit, I downloaded the zip file and "unblocked" it, extracted the dll, and referenced it in my project and added the following reference in my xaml:

- xmlns:extToolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"

I see the control at design time and am able to compile, but receive the error at runtime.  I am using VS2010 and .NET 4.0.

Do I need to add any additional references to use the toolkit?



Aug 10, 2011 at 3:36 PM

This is a strange one.  There are no dependencies. Did you check the DLL in your bin/debug folder to see if it has actually been unblocked?  Have you tried a clean and rebuild?  Did you download the correct binaries?  Make sure you downloaded the binaries for the .NET framework 4.0.  Have you tried the nuget package?

Aug 10, 2011 at 8:59 PM

Thanks for the quick reply Brian.

I figured out the problem - my solution is using Prism (MVVM) and I had to add a reference to the extended toolkit dll in the Shell project.  Not sure why the reference is needed here in addition to the project where I am using the toolkit, but once I did this the load error went away.



Aug 11, 2011 at 3:14 PM

Ahh, that would cause it.  The reason is because when you build the Module project the references are not copied to the Shell project.  The Shell is unaware of any references that your modules may depend on.  If you don't want to add the references to the Shell project, you can add a post build event to copy them to the output bin directory automatically.