none
Assembly versioning RRS feed

  • Question

  • I'm in the following situation:
    I'm trying to integrate Workflow Foundation in an ASP.net website. During the flow of the application the state of a workflow  (this is just a bunch of objects) can be serialized to a binary form and stored in a database. A flow can stay in the database for an unknown amount of time, but while it's in the database changes can be made to my classes. So I need to use .Net assembly versioning to be able to deserialize the persisted object later on.

    I read some things about it, but now I still got some questions about it:

    1) When deploying a new version; can I just rename the old version and will the runtime find it automatically when it needs that older dll version? Or do I explicitely need to point the application to the old version?

    2) In all examples the assemblies have strong names. This means that the assembly needs to be signed. But what if I do not sign the assembly and I just increase the version number of the assembly, will versioning still work?

    Thanks in advance Wink

    Saturday, March 22, 2008 7:36 PM

Answers

  • In order to use .NET versioning capabilities it is necessary to sign your assemblies. If you want to have two versions of the same assembly you should place your two versions of the assembly in GAC. But if you want to store assemblies in local app folder, you should place them in different subfolders and provide assembly binding information in config file, renaming won't work.

    Also you can handle Resolve Assembly event of Application Domain. In this event handler you can manually manage all your assemblies and versions.

    Monday, March 24, 2008 10:02 AM