Can I use a different assembly version than the one installed with JAMS?
Yes! JAMS users have the ability to create an isolated job execution environment to have total control over the assemblies used by your jobs.
Why might using a Host Sub Directory be beneficial to me?
A Host Sub Directory could be beneficial if you utilize the following assembly versions differing from those delivered by JAMS:
- PowerShell jobs using modules
- Workflow jobs
- Custom execution methods
- Sequence Tasks
Assemblies Needed in Your Isolated Environment
Required Files
- JAMSHost.exe
- JAMSHost.exe.config
Note: You may choose to edit this file to add or modify the binding redirects.
- JAMSHost.pdb
- JAMSBaseTypes.dll
- JAMSBaseTypes.pdb
- JAMSHostBase.dll
- JAMSHostBase.pdb
Additional Files Required for PowerShell Jobs
- JAMSPSHost.dll
- JAMSPSHost.pdb
Additional Files Required for Workflow Jobs
- JAMSWFHost.dll
- JAMSWFHost.pdb
- JAMS.Activities.dll
- JAMS.Activities.pdb
- JAMS.Activities.*.dll
Note: Each set of activities may require additional assemblies.
- JAMS.Activities.*.pdb
How to Specify the Host Sub Directory
- Create a folder under the \MVPSI\JAMS\Scheduler\ directory. The identified dll's will be placed in this folder.
- Place the new folder and assemblies in the \MVPSI\JAMS\Agent\ directory on any agent that will run jobs that use this execution method.
By default, JAMS will attempt to load assemblies using one of the following scenarios:
- From the Scheduler directory.
- When running on an agent, the Agent directory.
User modifications to assemblies stored in either the Scheduler or Agent directories could cause issues, as these are also used by JAMS.
The Host Sub Directory property allows JAMS jobs to use different versions of the default assemblies without needing to override the default values.
For example:
- By default, the PowerShell execution method stores its assemblies at \MVPSI\JAMS\Scheduler\PSHost and the value is set to PSHost (see screenshot below).
- This sets the BaseDirectory for the AppDomain to the specified directory rather than defaulting to the JAMS installation directory.
Troubleshooting
JAMS can log the path used to load the assemblies for a given execution method. The path can be logged by setting the ExecutingJob Logging to verbose for the Executor service using the JAMS Management cmdlets:
- Use the following command to load the JAMS Management cmdlets:
Import-Module JAMSManagement
- Use the following command to set the logging level:
Set-JMTraceSource -SourceName ExecutingJob -TraceLevel Verbose -Service Executor
- An example log message is as follows:
ExecutingJob Verbose: 0 : Formatted Application: C:\Program Files\MVPSI\JAMS\Scheduler\PSHost\JAMSHost.exe
The format of the path given in the the log message is:JAMSDirectory\HostSubDirectory\HostExecutable
- After diagnosing the issue, turn the additional logging off with the following command or restart the executor service:
Set-JMTraceSource -SourceName ExecutingJob -TraceLevel Error -Service Executor
Related Articles
Visit Microsoft to Learn More
Comments