Could not load file or assembly

Jun 25, 2012 at 6:57 AM

I've downloaded the binaries, "unblocked" them, moved them into a folder in my project, and added a reference to the assembly.

Visual Studio Intellisense works, and I've added an element from this assembly. When I try to load a form with that new element I get this error;


System.Windows.Markup.XamlParseException occurred
Message=Could not load file or assembly 'WPFToolkit.Extended, PublicKeyToken=3e4669d2f30244f4' or one of its dependencies. The system cannot find the file specified.

InnerException: System.IO.FileNotFoundException
Message=Could not load file or assembly 'WPFToolkit.Extended, PublicKeyToken=3e4669d2f30244f4' or one of its dependencies. The system cannot find the file specified.
FileName=WPFToolkit.Extended, PublicKeyToken=3e4669d2f30244f4
FusionLog==== Pre-bind state information ===

LOG: User = [removed]
LOG: DisplayName = WPFToolkit.Extended, PublicKeyToken=3e4669d2f30244f4
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: WPFToolkit.Extended, PublicKeyToken=3e4669d2f30244f4 | Domain ID: 1
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper for more information and common solutions to this issue.
LOG: Appbase = file:///[removed]/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : PresentationFramework, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///[removed]/bin/Debug/WPFToolkit.Extended.DLL.
LOG: Attempting download of new URL file:///[removed]/bin/Debug/WPFToolkit.Extended/WPFToolkit.Extended.DLL.
LOG: Attempting download of new URL file:///[removed]/bin/Debug/WPFToolkit.Extended.EXE.
LOG: Attempting download of new URL file:///[removed]/bin/Debug/WPFToolkit.Extended/WPFToolkit.Extended.EXE.


Can someone please explain what's happening to me?

Jun 27, 2012 at 6:59 PM



It seems the assembly cannot be found at runtime.  From the log, I could see that the WPFToolkit.Extended.DLL file isn't in the "/bin/Debug" folder.  It seems it hasn't been copied to your application folder after compilation.


Try this:

  1. Open your solution in Visual Studio.
  2. Select the WPFToolkit.Extended assembly in your project References.
  3. Open the Properties panel for the WPFToolkit.Extended assembly (Right-Click -> Properties OR Alt-Enter).
  4. Make sure "Copy Local" is set to True.
  5. Rebuild your application.


Now, you should see a copy of the assembly in the "/bin/Debug" folder.

Jun 29, 2012 at 12:27 AM

Hey, thanks, that fixed it. Kind of.

Copy Local was True already, but for some reason it wasn't copying it to /bin/debug.

I've manually copied it there, and it now works.