locked
Activity Toolbox - Exceptions thrown for upgraded activities RRS feed

  • Question

  • We have a scenario where we are compiling workflows into separate DLLs and storing them in a location on the client, and then loading those into the .NET activity toolbox as "Activities" which can be dragged onto the designer canvas surface.

    We are now moving our application to another version (Version 2 of our product) and all of a sudden these "saved workflow" activities no longer show in the toolbox and throw exceptions instead.  The exceptions are related to dependencies - we have made sure to add any "previous version" dependencies the activities might have to the GAC, so it should be able to resolve to those ... but that hasn't helped.

    Actual exception: "Could not load file or assembly '1fd40ab4-caf1-4d24-b87b-f1a0f56585ff, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

    The other thing is - the workflows themselves load fine in the designer and execute correctly without any upgrades ... it's only in loading them in the toolbox where the problem exists.

    Are there any suggestions for how we can resolve this or work around it?  We know we can re-save the workflows under the new environment and that fixes the problem, however that's a huge upgrade nightmare.

    Tuesday, October 30, 2012 5:23 PM

All replies

  • Hi,

    I'd suggest you try Process Monitor to figure out where it tried to load the file and assembly. You can download Process Monitor from here:

    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, November 1, 2012 9:28 AM
  • After poking around in the Fusion log, I think what's happening is that when I am compiling the Workflow XAML Definition into the assembly and creating the dynamic assembly, it's looking for "specific versions" of assemblies.  Perhaps similar to how you can specific "SpecificVersion = true" in Visual studio.

    Is there a way to programmatically compile and build the DLL so it is NOT looking for a specific version of dependency references?

    Thursday, November 1, 2012 6:06 PM
  • Hi,

    ->Is there a way to programmatically compile and build the DLL so it is NOT looking for a specific version of dependency references?

    As far as I know, there is not a switch we can use to turn off this behavior. We could always use strong-named assemblies:

    Strong-Named Assemblies

    http://msdn.microsoft.com/en-us/library/wd40t7ad.aspx


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Edited by LeoTang Monday, November 5, 2012 8:38 AM
    Monday, November 5, 2012 8:36 AM
  • Yes, all of the dependencies are already strong-named assemblies.  It doesn't seem to make a difference - it's still looking for version 1.0.0.0 of the assemblies instead of 1.1.0.0 which is the version in the GAC.
    Monday, November 5, 2012 5:12 PM