- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-10-19 09:01 PM
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.
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-10-19 07:56 AM
I have had this issue as well. I got the following answer from support about using external DLLs.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 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
- The directory where the Blue Prism “automate.exe” executable file is located.
- The current directory.
- 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
- The Windows directory. The %windir% variable retrieves the path of this directory.
- The directories listed in the %PATH% environment variable. The ‘path’ command lists the full set of directories currently set.
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-10-19 07:56 AM
I have had this issue as well. I got the following answer from support about using external DLLs.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- 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
- The directory where the Blue Prism “automate.exe” executable file is located.
- The current directory.
- 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
- The Windows directory. The %windir% variable retrieves the path of this directory.
- The directories listed in the %PATH% environment variable. The ‘path’ command lists the full set of directories currently set.
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-10-19 09:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-01-21 08:33 AM
------------------------------
Massimiliano Bellisario
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
23-03-22 08:58 PM
I had the same issue. Even I tried all the options for external files, I was getting the error again and again. Finally I closed Blue Prism (both Studios and Connection) and opened again, now everything works perfect!
So please try to restart Blue Prism and/or PC.
Restart is a thing that you don't know whether to eat or rub it on.
Best,
------------------------------
Rahym Salamov
------------------------------
