Could not load file or assembly 'SourceCode.EventBus.EventAssemblies.dll'
kbt134246
PRODUCTIssue
Could not load file or assembly 'SourceCode.EventBus.EventAssemblies.dll' - when deploying from K2 Studio the invalid SourceCode.EventBus.EventAssemblies.dll is loaded in the K2 Database.
Symptoms
The problem occurs when you install K2 on a drive that is not where the OS is and it uses the path [INSTALLDIR] instead of the full path.
The most probable cause is the error that is reported as "Could not load file or assembly '[INSTALLDIR]Host Server\Bin\SourceCode.EventBus.EventAssemblies.dll' or one of its dependencies."
Troubleshooting Steps
Complete the following steps to fix the error:
Please ensure that you stop the K2 Blackpearl server services and make a backup of the database and config files prior to performing the following.
Also, please update the [Drive letter:] to the drive letter where K2 Blackpearl is installed.
In K2Hostserver.config update mailassembly and mailassemblytype pointed to the wrong .dll
• Update the mailassembly to point to [Drive letter:]Program Files (x86)K2 BlackpearlHost ServerBinSourceCode.EventBus.MessageBusRecorder.dll instead of [INSTALLDIR]Host ServerBinSourceCode.EventBus.EventAssemblies.dll'
• Update to point to SourceCode.EventBus.MessageBusRecorder.MessageBusMailer instead of SourceCode.EventBus.EventAssemblies.Mail.
New Config:
<sourcecode.eventbus mailassembly="C:Program Files (x86)K2 blackpearlHost ServerBinSourceCode.EventBus.MessageBusRecorder.dll" mailassemblytype="SourceCode.EventBus.MessageBusRecorder.MessageBusMailer" mailmethodsignature="Void SendMail(System.String, System.String, System.String, System.String, System.String, System.String, Boolean, System.String)" notificationtemplatepath="C:Program Files (x86)K2 blackpearlHost ServerBinSourceCode.EventBus.ClientRecorder.DLL.mailTemplate" eventbusserverdependencies="SourceCode.SmartObjects.Runtime.SmartObjectClientServer,
SourceCode.SmartObjects.Runtime.SmartObjectManagementServer" msmqpath=".Private$EventBus"
msmqerrorpath=".Private$EventBus Error" eventqueuingassembly="SourceCode.EventBus.MSMQSource.dll"
eventqueuingtype="SourceCode.EventBus.MSMQSource.MessagesFromSource" eventbuffersize="25"
eventpollinginterval="60" getschedulesinterval="60" sendmailfrom="system@k2.local">
<sourcecode.eventbus mailassembly="C:Program Files (x86)Host ServerBinSourceCode.EventBus.EventAssemblies.dll" mailassemblytype="SourceCode.EventBus.EventAssemblies.Mail" mailmethodsignature="Void SendMail(System.String, System.String, System.String, System.String, System.String, System.String, Boolean, System.String)" notificationtemplatepath="C:Program Files (x86)K2 blackpearlHost ServerBinSourceCode.EventBus.ClientRecorder.DLL.mailTemplate" eventbusserverdependencies="SourceCode.SmartObjects.Runtime.SmartObjectClientServer,
SourceCode.SmartObjects.Runtime.SmartObjectManagementServer" msmqpath=".Private$EventBus"
msmqerrorpath=".Private$EventBus Error" eventqueuingassembly="SourceCode.EventBus.MSMQSource.dll"
eventqueuingtype="SourceCode.EventBus.MSMQSource.MessagesFromSource" eventbuffersize="25" eventpollinginterval="60" getschedulesinterval="60" sendmailfrom="system@k2.local">
2. On the DB:
Then update the design template and redeploy. The issue should be resolved.