Thursday, June 23, 2011

SharePoint 2010 Workflow: Could not load file or assembly '$assemblyname$'

During workflow development I got the following error when starting a Site workflow:

Load Workflow Assembly: System.IO.FileNotFoundException:
Could not load file or assembly '$assemblyname$' or one of its dependencies. The system cannot find the file specified. File name: '$assemblyname$'


Very strange, it did worked for months. So I checked the workflow feature in the 14-hive. The element manifest was wrong. It contained the $assemblyname$ tag instead of the assembly name.

<Workflow
Name="Ctalk - MailCtalkEditieWF"
Description="Workflow for sending Ctalk Editions"
Id="15f3ae38-12bc-4dbf-ad2b-9281ff09d43e"
CodeBesideClass="Ctac.Ctalk.MailCtalkEditie.MailCtalkEditie"
CodeBesideAssembly="$assemblyname$">

After a ‘normal’ deployment in VS2010 the element manifest file was correct:

<Workflow
Name="Ctalk - MailCtalkEditieWF"
Description="Workflow for sending Ctalk Editions"
Id="15f3ae38-12bc-4dbf-ad2b-9281ff09d43e"
CodeBesideClass="Ctac.Ctalk.MailCtalkEditie.MailCtalkEditie"
CodeBesideAssembly="Ctac.Ctalk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6a509658686505f0">


So what was the problem… It’s the VS2010 ‘Copy to SharePoint Root’ command part of the CKSDev extension. It just copied the file as is, it doesn’t replace the tag. So keep this in mind when using the ‘Copy to SharePoint Root’ command in combination with workflow development.

4 comments:

  1. Where is the changed config file? I have this problem, but I cannot find the config file.

    ReplyDelete
  2. Thanks for sharing!

    Anders
    Sweden

    ReplyDelete
  3. It's true, thank you!

    ReplyDelete
  4. Yep, this was my issue. Glad you posted this.

    ReplyDelete

Note: Only a member of this blog may post a comment.