none
.Net Winforms dll issue when making new dll RRS feed

  • Question

  • Hi.
    I am making a windows application project which uses a few dlls which have been developed by other people.

    Each time, a new dll is generated, its version is updated. If I drop this new dll on top of the existing dll then applications which were compiled using the previous version do not work. .Net complains that the version of dll are not correct!

    As far as I was aware, I could drop a new dll and and application should work fine as I have only added the dll as a reference to the project and these are valid COM objects.

    I have checked that reference property are set as dont care about version!

    Please help as I am not sure what to do and this is causing realy agony at my end!
    Wednesday, May 7, 2008 4:43 PM

Answers

  • The "Specific Version" property, which I assume that you are using, controls which version of the referenced assembly the compiler links against.  At run time, the referenced strong named assembly on disk must match the linked version number exactly, regardless of this setting.

     

    To make this work, you probably need to stop incrementing the version numbers when you build.  When using signed assemblies, the .NET Framework has no tolerance for version numbers that do not match.  (Not everyone agrees with how this works--but it is the case.)

     

    If you want to assign a version number to your software, consider using the FileVersion attribute instead of the AssemblyVersion attribute.  The FileVersion is informational only; it will show up in Windows Explorer but will not affect the loading of assemblies.

     

    Wednesday, May 7, 2008 10:20 PM