Tech Off Post

Single Post Permalink

View Thread: WPF and assembly references
  • User profile image

    Say I have a WPF application in a project called "Application". The application uses a control from a WPF user control library called "UserControls". One of the controls in that library uses a control from a third library called "ThirdLibrary". The UserControls library has a reference to the ThirdLibrary assembly, the control and its child control from ThirdLibrary shows up in the designer, and everything compiles just fine.

    However, when you run the application, a runtime exception is thrown because the ThirdLibrary assembly can't be find. To remedy this, you need to manually add a reference to ThirdLibrary in the Application assembly as well. Why can't the compiler figure this out for itself?