Could not load type 'SourceCode.SmartObjects.Client.ExecuteListReaderOptions'

  • 21 April 2014
  • 3 replies
  • 3 views

Badge

Hello All,

 

I am using smartobject client API to execute smartobject's list method (ExecuteList). But we are getting error like below.

Could not load type 'SourceCode.SmartObjects.Client.ExecuteListReaderOptions' from assembly 'SourceCode.SmartObjects.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d'.

 

We are not  getting any error If I use ExecuteScalar method.

 

Server Details:

OS: Windows Server 2012 R2

K2 BlackPearl: 4.6.7

 

The same application is working fine on other server which is having BlackPeral version 4.6.6 and OS Windows Server 2012.


3 replies

Userlevel 5
Badge +18

Hello,


 


Is the version of the SourceCode.SmartObjects.Client.dll assembly referenced in your project on the same version as the K2 server that your code is running against?

Badge +1

Did you ever find an answer for this? I'm running into the same issue.

Badge +7

I had the pleasure of working with this issue today so this is for the future people who may run into it. 

 

Errors with loading assemblies have often resulted from these scenarios:

  • Corruption in the downloaded installation media
  • If the installation files were extracted on a network drive & then the folder copied to the server, sometimes the OS blocks assembly files and cause the error
  • Antivirus software blocks the assembly during installation
  • A local file permission prevents assemblies from installing correctly
  • The version of K2 blackpearl on the client vs. the version on the server is not the same (i.e. client is running 4.6.8 and tries to communicate with a server running 4.6.5)

Some things to try include:

 

1. Performing a repair

  • Copy unextracted installer onto the server and extract the file directly on the server
  • Navigate to the [ExtractedDirectory]K2 blackpearl 4.6.8 (4.12060.1600.0)Installation directory [Note: make sure you put in your version after K2 blackpearl]
  • Right click on the 'Setup.exe' and "Run as administrator"
  • Perform a "Repair"
  • Test to see if "Could not load type...." error comes up again

2. Checking the configurationmanager.config file 'C:ProgramDataSourceCodeConfigurationManager.config' to see which K2 Server is being pointed at and checking if the server matches the version of the tool on the client (basically what tin asked above). If it doesn't match, you may need to upgrade one to match the other (for example, upgrade one so that both are using 4.6.8)

 

3. For some customers, unintalling and re-installing has resolved the issue. With this, it's recommended that customers redownload the installation file from portal.k2.com and then temporarily disable anti-virus software or put it in an "installationallow" mode.

 

All right, hope that comes in handy en la futura. 

 

Best wishes,

Alyssa

Reply