locked
Question on referencing and different versions of a library RRS feed

  • Question

  • Hey guys,

    Lets say I created a library and referenced some other library, call it DllVersion2.  I build it and everything works as expected.

    Now, lets say the library I created is going to be used in some app, and that app references DllVersion1, an earlier version of DllVersion2.  All that is different is that DllVersion2 has one more interface member defined.

    My question is, where is the reference information of my library stored?  Will my library reference DllVersion1 since DllVersion2 is not there or will the app not work?  If my library doesn't use any of the new features of DllVersion2, it should be able to work with DllVersion1, right?  Do I have to distribute my library along with everything it references?

    Thanks for the help Smile
    Saturday, March 31, 2007 12:42 AM

Answers

  • If you've strong-named your first DLL then your app will always be looking for the DLL by version.  Your app will always look for a specific version also, if you've set the Specific Version property of your reference to True.

    The framework designers thought of this and created some App.config settings that can be used to redirect an applications reference to a specific version of an assembly to another.  See http://geekswithblogs.net/bcorazza/archive/2006/05/23/79366.aspx for an example.
    Saturday, March 31, 2007 12:10 PM