Symptoms
Error occurred while creating new package:
System.InvalidCastException: SourceCode.SmartObjects.Configuration.SmartObjectsRuntimeConfigurationSection cannot be cast to SourceCode.SmartObjects.Configuration.SmartObjectsRuntimeConfigurationSection. Type A originates from 'SourceCode.SmartObjects.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d' in the context 'Default' at location 'C:Program Files (x86)K2 blackpearlHost ServerBinSourceCode.SmartObjects.Configuration.dll'. Type B originates from 'SourceCode.SmartObjects.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d' in the context 'LoadFrom' at location 'C:Program Files (x86)K2 blackpearlServiceBrokerSourceCode.SmartObjects.Configuration.dll'.
at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RemoteCall(String TypeName, String MethodName, Objectt] Parameters, Booleann] NullList, MarshalMessageType CallType)
at SourceCode.Hosting.Client.BaseAPI.BaseAPI.RemoteCall(String TypeName, String MethodName, Objectt] Parameters, Booleann] NullList, MarshalMessageType CallType)
at SourceCode.Hosting.Client.BaseAPI.BaseAPI.RemoteSessionCall(String TypeName, String MethodName, Objectt] Parameters)
at SourceCode.Deployment.Management.PackageDeploymentManager.CreateSession(IServiceProvider provider, String sessionName, String sessionOwner)
at SourceCode.Management.SnapIns.K2Management.K2ServerFarm.CreatePackage()
Diagnoses
This is a known issue with the PandD tool in 4.6.9
Resolution
The workaround for this would be to remove the SourceCode.SmartObjects.Configuration.dll inside the "eInstall Driver]K2 blackpearlServiceBroker" directory.