AssemblyVersion, AssemblyFileVersion and Product Upgrade RRS feed

  • Question

  • User1417140358 posted

    I am confused in between the behavior of AssemblyVersion and AssemblyFileVersion. I know that the AssemblyFileVersion is optional. If not given, the AssemblyVersion is used.

    Case 1

    I have a product installed with a class library with AssemblyFileVersion When I create next version of the product which has some changes in the library then it fails to show the changes in the upgraded product.

    Case 2

    If I change the AssemblyFileVersion to greater than current then it successfully replaces the file and shows me all the changes after product upgrade in next release.

    Case 3

    Upgrade of the assembly in the product also works fine when I set the version number with * for example 1.0.0.*

    Case 4

    The Class library (1.0.0.* ) is shared through SVN. On my machine the instead of * it shows me some number greater that 5000. For same project on another dev pc it generates number in 2000 series. Due to this the new release of the product created from other PC fails replace the assembly of older product having version >5000.

    I know the basic thing that it failed becuase the installer found a newer version already deployed so ignored the assemlby from current setup.


    We will have to increment version number manually for each release of the class library.

    Solution 2

    We can keep 1.0.*.* which we create a new number every time but I will have to make sure that I create release from that same PC. I will not be able to create further release from other PC.

    Please correct me if I am wrong.

    Help me to understand the behavior and best practice to create product release where it is shared in team. I want to keep the version number generation automated to avoid human mistakes while creating release.

    Thursday, November 28, 2013 6:15 AM


  • User1417140358 posted

    I have already gone through the above links and then only I posted my question here.

    Precisely I want to know if there is any way to set the AssemlyVersion as automatically which will be in sync with other team members. I have 11 class libraries in my website project. If we miss to change the version number for any class library then the installer fails to replace the file while upgrade.

    Seems like this tool http://autobuildversion.codeplex.com/ can help me.

    Any thoughts?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 28, 2013 11:04 PM

All replies