Digital Exchange

last person joined: 9 hours ago 

This community is a place to discuss the Blue Prism DX and all of the assets hosted there.
Expand all | Collapse all

Could not Load assembly file

Jump to Best Answer
  • 1.  Could not Load assembly file

    Posted 10-01-2019 16:01

    I am trying to remove password from pdf using C# code. Initially I tried with SPIRE.pdf and then Apitron.pdf.kit dlls.

    In both cases, the code was working fine in my laptop however if i try the same code using same library in my client machine, I am getting any error

    Could not load file or assembly Apitron.PDF.Kit Version=2.0.21.0 Culture=neural, Public Key Token=6e759db or one of its dependencies. The system cannot find the file specified.

    I am writing C# code in Blue Prism

    Please someone advice the cause of the issue.

    --------------------------------------------------
    Disclaimer: This content was auto-posted from Stackoverflow. The original Stackoverflow question is here Stackoverflow Post, posted by Divakar Ragupathy.


  • 2.  RE: Could not Load assembly file
    Best Answer

    Posted 10-02-2019 02:56
    Hi

    I have had this issue as well. I got the following answer from support about using external DLLs.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Pre-Requisites
    It is recommended that you have a good coding knowledge before attempting to utilise any of the information provided below. Blue Prism requires the following before being able to use external code:-
    • The file must be in a location that Blue Prism can access 
    • The user account which attempts to load the DLL file must have at least Read Access to the location that the file is stored in 
    Locations for external files
    The following locations are typically accessible to Blue Prism, and are checked in this sequence:- 
    1. The directory where the Blue Prism “automate.exe” executable file is located. 
    2. The current directory. 
    3. The Windows system directory. The %windir%\system variable retrieves the path of this directory for 64-bit files on a 64-bit OS, and 32-bit files on a 32-bit OS. For 32-bit files hosted on a 64-bit OS the directory is %windir%\SysWOW64 
    4. The Windows directory. The %windir% variable retrieves the path of this directory. 
    5. The directories listed in the %PATH% environment variable. The ‘path’ command lists the full set of directories currently set. 
    6. In the .NET Framework Global Assembly Cache.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Option 1 works well given that your current directory is the folder where automate.exe is located. For your blue prism application shortcut, go to properties and check the "start in" is set to the folder where automate.exe is located. Make sure your dll is located in the same folder as automate.exe and in you object you should reference the dll-file only by name, not the full path. You can make a process in blueprism to deploy the dll-files to the automate.exe folder.

    I could not get option 2-5 to work.

    Option 6 works but it is a bit inconvenient. You can use something like innosetup to add dlls to GAC.

    Option 1 works best in my opinion.

    Another thing that can cause this issue is that your dll has dependencies to other dll files. Then you need to also place the dependencies in the same folder as automate.exe.





  • 3.  RE: Could not Load assembly file

    Posted 10-02-2019 16:15
    Thanks for sharing, Peter!




  • 4.  RE: Could not Load assembly file

    Posted 01-15-2021 03:33
    How can i load a dll from networkpath ?

    ------------------------------
    Massimiliano Bellisario
    ------------------------------



FAQ

The Blue Prism Digital Exchange (DX) is an online marketplace where businesses can instantly access, apply and share pre-built AI, cognitive and advanced RPA technologies from best-in-class providers. These assets easily connect to existing digital workers, systems and processes to enhance automation capabilities.
The Digital Exchange is free to all users. Most of the content on the DX is free to download but there are some submissions that do have a cost associated. The submissions with a cost are advertised on the asset card and profile. No unwanted costs will be applied to any users.
You can visit and browse the Digital Exchange by navigating to . If you would like to consume or download any material it is necessary to create an account on the Portal first.
Everyone can access the Digital Exchange and consume the assets on it. If you would like to contribute to the marketplace it is necessary that you create an account and sign up as a partner.


#marketplace
#assets

Share this post