There are two ways to load assembly in the C# block - from file and from GAC(Global Assembly Cache)
At times, you could face an error "Could not load assembly" while trying to load an assembly from a file. In that case, follow the steps below -
- Right-click on the DLL file at your end and check the Unblock checkbox and save/Apply.
2. After applying, close your LEAPWORK studio after saving all the test flows.
3. Go the folder path C:\Program Files\LEAPWORK\Studio and open the Studio.config file.
4. Scroll to the last of this config file and add this tag <loadFromRemoteSources enabled="true" /> in the config file.
5. Save the config file and then open the studio and try to add the DLL
In case, where you are trying to add an assembly directly from GAC and face a similar issue then please check the version of the assembly you are trying to load if it's present in GAC or not.
For any clarification, please contact our Priority Support.