Object reference not set to an instance of an object when enlisting orchestration
Becuase our solution involved quite a few schemas, pipelines, property schemas, map etc on top of the process itself (and the fact that some of those we're already deployed to another application in our BizTalk server) we could not easily use visual studio to deploy the process (which is quite a limited option anyway, as I've blogged in the past).
Becuase we mostly did not change the process interface anyway we could get away witht he usual cycle of build, gac and restart (as you do), but eventually we did have to make an interface change (in this particular case it involved changing a "specify later" orchestration port to a "direct" port) so we had to re-deploy the assembly with the processes.
knowing that deploying from VS will not work we used BTSTask to deploy.
However, when we went to enlist the orchestration we've receive "Object reference not set to an instance of an object" error.
The cause of this was that I forgot that BTSTask does not GAC the assembly during deployment (although when deploying from VS assemblies do get GAC'd) and so the definition in the biztalk db did not match the acutall assembly loaded from the GAC.
GAC-ing the updated assembly solved this of course.