Tech Off Thread

2 posts

WPF and assembly references

Back to Forum: Tech Off
  • User profile image
    Bas

    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?

  • User profile image
    davewill

    If it did figure this out wouldn't that mean that the top level binary compile directory would contain all the dependencies set to "copy local" for the full stack?  I guess it would.  What would then happen if a project in the middle of the dependency stack were built? Should the newly built binary be pushed up the tree to the compile directories for the higher level binary directories?

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.