Not finding the file or assembly for Activities, PublicKeyToken=null"

Apr 29, 2013 at 5:21 PM
I am getting this error when i use a code activity created using LASG in a workflow:

Could not load file or assembly 'ABC.Workflows.Activities, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.":"ABC.Workflows.Activities, PublicKeyToken=null"}

The error is at asm = System.Reflection.Assembly.Load(assemblyName.FullName);
in the following code.

It is able to load the business dll and business.entitites dll. All are in the same place.

private static System.Reflection.Assembly Load(string assemblyNameVal) {
        System.Reflection.AssemblyName assemblyName = new System.Reflection.AssemblyName(assemblyNameVal);
        byte[] publicKeyToken = assemblyName.GetPublicKeyToken();
        System.Reflection.Assembly asm = null;
        try {
            asm = System.Reflection.Assembly.Load(assemblyName.FullName);
        }
        catch (System.Exception ) {
            System.Reflection.AssemblyName shortName = new System.Reflection.AssemblyName(assemblyName.Name);
            if ((publicKeyToken != null)) {
                shortName.SetPublicKeyToken(publicKeyToken);
            }
            asm = System.Reflection.Assembly.Load(shortName);
        }
        return asm;
    }
Coordinator
Jun 20, 2013 at 3:45 PM
Hi,

Have you also referenced your Entities and Business Components project?

Hugs,
Serena