In my previous post, I’ve been exploring how changing the version of an ActivityLibrary affects a workflow. In this post I want to explore how Workflow Services behave.
The good news – as far as I can tell, they behave exactly as they should behave loading the assembly version they were built with.
For this test I have a Workflow Service that uses an activity from ActivityLibrary1 and we will run through a similar set of scenarios deploying a Workflow Service (.xamlx) to a web site hosted in IIS.
Expected: Workflow Service will load Activity V1 from Bin directory
Expected: Workflow Service will load Activity V1 from GAC
Expected: Workflow Service will fail with exception because it cannot load Activity V1
Actual: System.IO.FileLoadException: Could not load file or assembly 'ActivityLibrary1, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c18b97d2d48a43ab' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Expected: Workflow Service will load activity V1 from GAC
Actual: Exception Could not load file or assembly 'ActivityLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c18b97d2d48a43ab' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Expected: Workflow Service will fail with exception because it cannot load Activity V2
Actual: System.IO.FileNotFoundException: Could not load file or assembly 'ActivityLibrary1, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c18b97d2d48a43ab' or one of its dependencies. The system cannot find the file specified.