Ive been having some problems with versioning for BizTalk recently and in particular it was centred around one map.

Initially the problems were related to the configuration manager but then when this was resolved there was another little gotcha which is probably worth bearing in mind.

Soon the development machine everything versions as 999.999.999.999 and this is usually pretty pain free. On the build server though a version number is applied from cruise control and replaces anything with 999.999.999.999 with the CCNet version number. Any other version number is not touched incase we are using multiple versions of one of our assemblies.

In the map I was having problems with it always seemed to pick up either an old version or version which was not something that should have existed.

I eventually tracked the problem down the the xml under the map where you find the following snippet referencing your assembly.

<Script Language=”ExternalAssembly” Assembly=”Acme.Utilities, Version=, Culture=neutral, PublicKeyToken=056df4562600885d” Class=”Acme.Utilities.Mapping.MemberStatusMapping” Function=”Map” AssemblyPath=”..\..Acme.Utilities\obj\Release\Acme.Utilities.dll” />

What is happening is that because its a project reference between the map project and the C# project its popping in the path to the utilities assembly, however when I first created the map I must have been in Release configuration where as for the other maps I must have been in Debug configuration. In the development machine because its always the same version number this problem never shows up, but on the build server the version number changes with each build which makes this visible.

In the server build we do a Debug build and then a Release build. In the above case when we do the Debug build there is nothing in the the release folder so it was then using the version number.

Unfortunately this issue doesnt display itself as a compilation error which is a big pain because you get to the BizUnit tests and find that you get strange failures which are a real problem to troubleshoot andits difficult to track this back to the source of the problem.

Anyway another one which might save someone a few hours