When you run a script, the adTempus script engine compiles the code into a .NET assembly. If the script references libraries, they are also compiled into assemblies. These assemblies are all cached so that the next time the code is run, it doesn't have to be recompiled. When you modify a script or library, it gets recompiled the next time it's run, and the cache is updated. (The file name you cited contains the OID of the library plus the last modified timestamp of the library.)
What seems to be happening in your case is:
- You've got a script, Script A, that has been compiled and cached, referencing the PortPlusLibrary library, which has been compiled and cached as a result.
- You import a new version of the PortPlusLibrary.
- Some script, Script X, runs that references the library, causing the library to get recompiled and cached with a new timestamp. The script engine then purges the old version of the library from the cache.
- You run Script A again. Script A has not been modified since the last time it was run, so the script engine doesn't recompile it--it just uses the cached assembly. The cached assembly is compiled to look for the old version of PortPlusLibrary, which no longer exists in the cache, so the script fails.
I don't think it matters that you have a library referencing another
library, except that the same problem could be shifted over one step in
the process--the script references Library X, which references
PortPlusLibrary. In this case the script successfully loads Library X,
but Library X is looking for the old PortPlusLibrary and therefore
fails.
The bug here is that the script engine should be checking to see if any of the libraries referenced by the script have been updated, and recompile the script in that case. We'll start working on a fix for that.
In the meantime one workaround is to clear the script engine's cache after you do the import. The cache is found under "C:\Users\UserName\AppData\Local\Arcana Development\adTempus\ScriptEngine\Cache", where UserName is the user whose account the job is running under. If you are running script jobs under multiple user accounts, you will need to clear the cache for each user.
You can just delete everything in that folder, but the catch is that you won't be able to do it while the job host (adtempus.jobhost.exe) is running. This process will shut itself down if it hasn't run any scripts in the last 10 minutes or so, or you can kill it through Task Manager if you're sure no scripts are running.
In testing out your issue we found a more serious problem with importing in version 4.6, so don't go updating to 4.6 in the hope that the new version will fix your issue.