.config files and custom configSections with ESAPI dll: Could not load file or assembly

Apr 5, 2016 at 6:20 AM

as the name implies, I am trying to build a plan evaluation tool but would like to configure some settings of the ESAPI DLL using a .config file. I have used a custom config setion in my App.config as below:

    <section name="evaluationBlockCollectionSection" type="PlanQAScript.PlanEvaluationConfigSection,PlanQAScript"/>

I have generated my PlanQAScript.esapi.dll and the PlanQAScript.esapi.dll.config is created in bin/Release directory, the same location of .esapi.dll.

When I try to run my scrip in Eclipse, I keep getting the error:

"Could not load file or assembly 'PlanQAScript' or one of its dependencies. The system cannot find the file specified."

Somehow during runtime, the Eclispse script can't load the dll while parsing the config file. This appeas to be a well known problem but I can't find any working solution espcially when combining config files with ESAPI dll. Any help is appreciated.

Thank you.

Apr 5, 2016 at 3:40 PM
Is your assembly named PlanQAScript.esapi or just PlanQAScript? If it's PlanQAScript.esapi, you'll need to fix your "type" string with the correct assembly name.