Hi,
I have encountered a problem using the Extended WPF Toolkit which may or may not be a bug in the toolkit.
I have created a new solution (SimpleTest) with two projects;
* A WPF application (SimpleTest)
* A WPF UserControl Library (MyControlLibrary)
In MyControlLibrary I have added a nuget reference to the newest version of the Extended WPF Toolkit (2.4), and included a simple BusyIndicator on the default UserControl1.
If I then reference this project from my application (SimpleTest) and add the user control to the main window, and run the application, I get the exception informing me that the Xceed.Wpf.Toolkit assembly could not be found.
Having looked at the generated dependency graph from Visual Studio (Architecture -> Generate Dependency Graph), the assembly is not detected as a dependency, and therefore, by the will of Visual Studio, it is not copied to the bin/Debug-folder of the application, SimpleTest.
Therefore, it seems that Visual Studio does not recognize dependencies from the XAML directly. If I add the NuGet package to SimpleTest or give the control a name, Visual Studio is able to detect the dependency.
It's a simple, but unnecessary workaround. Is this a bug in this toolkit, or the dependency detection in Visual Studio/MSBuild?
Comments: ** Comment from web user: BoucherS **
I have encountered a problem using the Extended WPF Toolkit which may or may not be a bug in the toolkit.
I have created a new solution (SimpleTest) with two projects;
* A WPF application (SimpleTest)
* A WPF UserControl Library (MyControlLibrary)
In MyControlLibrary I have added a nuget reference to the newest version of the Extended WPF Toolkit (2.4), and included a simple BusyIndicator on the default UserControl1.
If I then reference this project from my application (SimpleTest) and add the user control to the main window, and run the application, I get the exception informing me that the Xceed.Wpf.Toolkit assembly could not be found.
Having looked at the generated dependency graph from Visual Studio (Architecture -> Generate Dependency Graph), the assembly is not detected as a dependency, and therefore, by the will of Visual Studio, it is not copied to the bin/Debug-folder of the application, SimpleTest.
Therefore, it seems that Visual Studio does not recognize dependencies from the XAML directly. If I add the NuGet package to SimpleTest or give the control a name, Visual Studio is able to detect the dependency.
It's a simple, but unnecessary workaround. Is this a bug in this toolkit, or the dependency detection in Visual Studio/MSBuild?
Comments: ** Comment from web user: BoucherS **
Hi,
You are not the first to see this error.
As you found out :
"To prevent this error, you always have to ensure the main entry point project, containing App.xaml.cs, also contains a reference to all of your third party libaries with their Copy Local attributes set to true. "
https://klausnji.wordpress.com/2014/11/15/wpf-application-cannot-load-assembly-on-startup/
It looks like a dependency detection in Visual Studio.