SharePoint 2013 BCS with WCF data source: Unknown Error occurred. Unable to load one or more of the requested types.


This is a common error that you would have faced, while adding a WCF service endpoint to BCS through SharePoint Designer 2013, connected to Office 365. The complete error would look like this:

Unknown Error occurred. Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

This is an error observed while connecting to a WCF data source through SharePoint Design 2013. Ensure that your WCF service endpoint is working perfectly.

Fix:

STEP 1: Open the “SPDESIGN.exe.config” file from SharePoint Designer folder ()

STEP 2: Update the file with the following configuration:

<?xml version=”1.0″ ?>
<configuration>
<startup>
<requiredRuntime version=”v2.0.50727″ />
<supportedRuntime version=”v2.0.50727″ />
</startup>
<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”Microsoft.BusinessData” publicKeyToken=”71e9bce111e9429c” culture=”neutral” />
<bindingRedirect oldVersion=”16.0.0.0-65535.65535.65535.65535″ newVersion=”15.0.0.0″/>
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

STEP 3: Save the file and run SharePoint Designer once again.

STEP 4: Try adding your WCF data source once again. Voila! you should see it work now…:)

The fix is just telling SPD to run BCS on version 15.0.0.0, if its gets a reference to version 16.0.0.0. I guess our Office 365 online considers SharePoint 2013 version as 16, instead of 15. Forward thinking…quite understandable…:)

Hope this helps!