You are viewing limited content. For full access, please sign in.

Question

Question

C # Script not loading external references

asked on January 2, 2014

When executing a Workflow with a C # Script, I get the following error "Could not load file or assembly" error. The external reference is present in the script and the Workflow validates and publishes without error.

 

The script has an external dll that calls an additional library. Both dlls were added as references to the script.

 

I am however able to run the script without getting the error when using the debug mode (F5).

 

Has anyone seen this before?
 

 

1 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on January 2, 2014

There could be a couple of reasons for this. When you test the script on the workflow designer it is testing it in the designer. When the workflow actually runs, everything is in the context of the workflow server. 

 

So some followup questions:

 

1) Does the error tell you which assembly is failing? If it does, is it the referenced library or the additional library?

 

2) Is the designer on the same machine as the workflow server? 

 

Possible workarounds:

1) Put the reference and its library  in the workflow server's install directory or the GAC

 

2 1

Replies

replied on January 2, 2014

Thank you for the quick turnaround.

 

The error did contain the assembly that was failing and it was in the referenced library. The designer being used is on the server.

 

We ended up putting the dlls in the install directory and it worked.

 

Thank you.

0 0
replied on January 25, 2018

Hi, sorry to reply to a really old thread but I think I'm having a similar issue and was wondering the exact path that you placed the DLLs in to resolve the issue.

 

Thanks.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.