Pages

Friday, May 29, 2009

Error occurred while starting of workflow (Could not load file or assembly Load Workflow Assembly System.IO.FileNotFoundException)

I was so frustrated to resolved above workflow error, because when I deployed my visual studio workflow solution package and started the workflow (manually or item created) then I was getting error in workflow status as “Failed on Start (retrying)”, also I didn’t see much useful information into workflow history, after looking into SharePoint log file, I have found below error.

Error:

Could not load file or assembly Load Workflow Assembly: System.IO.FileNotFoundException: Could not load file or assembly ‘ABC.dll, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxx' or one of its dependencies.
I know that there was some problem into feature.xml or workflow.xml file into solution package, but after looking into details, I have found out that I made very silly mistake into workflow.xml file, there was one tag called “CodeBesideAssembly”, we need to write only assembly name like ABC into that tag, but I wrote ABC.dll into CodeBesideAssembly tag into workflow.xml file which caused the error while starting of workflow.

After removing extra DLL word from the file, my workflow was worked fine. So be careful while making workflow.xml file.

Keep Sharing…

4 comments:

  1. I had also fall into the same error for me the reason is the the publickeytoken specified in the workflow.xml is different than the one in the gac for the same assembly. As soon i changed the Publickeytoken in the workflow.xml to the same as in the gac it started working like a charm. May be this will be helpful for future refrence.
    Thanks.

    ReplyDelete
  2. Yes Aniket, that's correct, I also found that publickeytoken is one of the reason for this type of error, your point will be helpful, thanks buddy !!

    ReplyDelete
  3. Very nice point of how small mistakes cause big problems.

    In the last line of your post "After removing extra DLL word from the file, my workflow was worked fine. So be careful while making workflow.dll file."
    I think you want to write workflow.xml instead of .dll... right?

    ReplyDelete
  4. That's correct Alkesh, thank you very much for correcting me.

    thanks!!!
    Sanket

    ReplyDelete