The assembly used when compiling might be different than that used when loading and the type is missing.



Why the error?

My WPF application UIXStandards has reference to a class library Controls which in turn has a reference to the Smt.Windows.Controls library. In Visual Studio when I add reference to Controls library from my UIXStandards  application, Visual Studio does not copy any references needed for the Controls library (e.g.) Smt.Windows.Controls to UIXStandards application.

Solution:
To solve the problem, within Visual Studio when you refer to a class library (Controls) also add references its dependencies (Smt.Windows.Controls).

Comments

Popular posts from this blog

WPF How to Dispose ViewModel when the associated UserControl (Not Window) closes?

C# How to unit test Dispatcher

WPF: How to Deep Copy WPF object (e.g. UIElement) ?