BizTalk assembly version redirection
The version redirection in BizTalk do NOT work as one is used to coming from a ordinary .NET developer background (so I was wrong in this post …). Say that we made a reference to a code library in one of our orchestrations. This code library is in version 1.0.0.0 when we build and deploy the orchestration to BizTalk and to the GAC. The setup in VS 2005 looks something like this.
Then we make some minor changes in the code library, we fix them and set the version to 1.0.1.0. Build and deploy it. This means that we now have one 1.0.0.0 and one 1.0.1.0 version side-by-side in the GAC (as shown in the figure below).
Coming from .NET the CLR should now load the 1.0.1.0 version as it identifies assemblies based on the assembly name, major or minor version (NOT the build and revision version), public key token and culture (more about this here).
However, this does NOT work in BizTalk. BizTalk loads assemblies by fullname it has stored in the management database and the build and revision number are part of the fullname … This means we have to build and redelopy EVERY part where we like to use new version of the code library.
There is one way around this for emergency use. Say that one has a code library that is used in loads of BizTalk artifacts (A place where we store all base functionality for the solution). Rebuilding all those parts and redeploying it, just to be able to update the version number, is not going to happened! It’s to much work and to risky. So it’s possible to make a change in the BTSBTSvc.exe.config file instead. In my case the change would be something like the below (read more about here).
<dependentAssembly> <assemblyIdentity name="StaticCodeLibrary" publicKeyToken="32ab4ba45e0a69a1" culture="neutral" /> <bindingRedirect oldVersion="1.0.0.0" newVersion="1.0.1.0"/> </dependentAssembly>
There's 3 Comments So Far
April 30th, 2007 at 9:34 am
Where to find that BSTBSTvc.exe.config file…
In which way it is related to Biztalk Project…
After editing that file and starting my biztalk application will have the effect of chaged assembly without redeploying?
October 15th, 2007 at 8:04 am
Hi Richard,
This post was very useful and it is working in BTS 04.
However I would like to know if there is a way to undeploy the old version of the assembly and keep only the new version.
I am not able to do so.
Regards,
Praseedha
Who Linked To This Post?
Share your thoughts, leave a comment!