Salesforce .Net API problems serializing headers – CS0030

 

I have a need to use the Salesforce .Net API tools for a project.  I was following the documentation on how to set this up and ran into a problem.  When I followed the instructions here:

https://developer.salesforce.com/page/Integrating_Force.com_with_Microsoft_.NET

I experienced an error logging in.  The error is listed below.

Unexpected login error: There was an error in serializing one of the headers in message loginRequest: ‘Unable to generate a temporary class (result=1). error CS0030: Cannot convert type ‘CaptionUpdates.SFDC.ListViewRecordColumn[]’ to ‘CaptionUpdates.SFDC.ListViewRecordColumn’ error CS0030: Cannot convert type ‘CaptionUpdates.SFDC.ListViewRecordColumn[]’ to ‘CaptionUpdates.SFDC.ListViewRecordColumn’ error CS0029: Cannot implicitly convert type ‘CaptionUpdates.SFDC.ListViewRecordColumn’ to ‘CaptionUpdates.SFDC.ListViewRecordColumn[]’ error CS0029: Cannot implicitly convert type ‘CaptionUpdates.SFDC.ListViewRecordColumn’ to ‘CaptionUpdates.SFDC.ListViewRecordColumn[]’ ‘.  Please see InnerException for more details.        

 

It took some searching to find out there is a bug in the WSDL import file.  There is a list that specified as a multidimensional array that should be a single dimension array.   I chose to fix this in the reference.cs file after the import.

The fixes are outlined in the images below:

Change this

Change From

To this

Change To

Change this

Change From

To this

Change to

This entry was posted in Programming. Bookmark the permalink.

1 Response to Salesforce .Net API problems serializing headers – CS0030

  1. Chris says:

    thanks for leaving this, you saved me from pain

Leave a Reply

Your email address will not be published.