I have an IIS hosted xamlx workflow with c# expressions that I\'m trying to run in side-by-side versioning.
I did exactly like this article: Side by side versioning
After analyzing the source code from .Net, I realized that the method CreateWorkflowServiceHost that I override in my custom workflow factory, adds all supported versions in it's return object.
All I had to do is iterate this collection and compile them all.
Final source code:
protected override WorkflowServiceHost CreateWorkflowServiceHost(WorkflowService service, Uri[] baseAddresses)
{
var host = base.CreateWorkflowServiceHost(service, baseAddresses);
// add your customizations here…
CompileExpressions(service.Body);
foreach (var supportedVersion in host.SupportedVersions)
{
CompileExpressions(supportedVersion.Body);
}
return host;
}