+44(0)1908 545 770
YOUR EXPERT RPA PARTNER

Team up with our RPA strategy and tech specialists for maximum automation impact

Find out more
Harness the power of UiPath in your business.
WATCH NOW

Save money and spend more time on priority work.

Book consultation
READY, SET, AUTOMATE

Let's choose, design and deploy a process automation solution for your business.

Find out more
TRANSFORM YOUR BUSINESS

Let's analyse your business to discover opportunities for innovation and automation.

Find out more

Begin your business transformation journey

Book consultation
AUTOMATE EVERY FUNCTION

Automate where it matters most. Scale to solve challenges in every area

Find out more
GIVE EVERY TEAM THE TOOLS FOR SUCCESS

Equip people with user-friendly solutions that save time and make work easier

Find out more

Which business problem
can we solve first?

Book consultation
05 March 2015

K2 Solving

Solving [A]SourceCode.SmartObjects.Configuration.SmartObjectsRuntimeConfigurationSection cannot be cast to [B]SourceCode.SmartObjects.Configuration.SmartObjectsRuntimeConfigurationSection

K2 Automated Testing Software

rnBenchQA allows full test automation of K2, including fully automated K2 SmartForms and K2 Workflow testing. It promotes test driven development for K2 and ensures continued quality assurance for K2 solutions. Easily apply changes to test cases to accommodate changes to K2 apps and ensure all apps are regression tested to avoid defects and assure continuous quality.

 

Free K2 Five Upgrade Review

 

After upgrading to K2 4.6.9 and opening the K2 Package and Deployment program, I got the error below.

[A]SourceCode.SmartObjects.Configuration.SmartObjectsRuntimeConfigurationSection cannot be cast to [B]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’

It looks like the assemblies are loaded with the default load and load-from context respectivly.  The differences are explained here.

After looking for a solution for ages, someone suggested overwriting the assembly in the ServiceBroker dicetory with the one in the HostServerbin directory.  I backed up the K2 instance and overwrote the assembly as suggested above and restarted K2.  When I went into the K2 Package and Deployment Management Console, it worked fine and I deployed by K2 solution.

I am yet to figure out if this is a bug or not, and I will have a word with one of the K2 support engineers to get a better idea of the root cause of this issue.

Need further technical advice or support?