The SharePoint CSOM assemblies and the “The specified module could not be found” error

When working on my community project SharePoint Client Browser I received multiple times the issue which related to the error message “The specified module could not be found”. The error log shows the error is thrown while authenticating with SharePoint Online.

File '' not found, check log file for detailed information. System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.EnsureInited() at Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.LogonIdentity(String username, SecureString password) at Microsoft.SharePoint.Client.SharePointOnlineCredentials..ctor(String username, SecureString password) at SPBrowser.Entities.TenantAuthentication.InitClientContext()

What is weird about this, although a FileNotFoundException is thrown, the exception details do not indicate which file is actually missing. #Fail!

What also did not help with resolving my issue was missing automated packaging of the SharePoint Client Browser tool. This is definitely one of those reasons to automate your build process. To ensure the package contains everything it needs, instead of missing a single file due to manual packaging.

So, we do we actually need? When building a solution based on the SharePoint CSOM we require a set of assemblies. Depending we are building for SharePoint 2013 (v15) or SharePoint Online (v16) we need a different set. But what was causing the issue was not one of the CSOM assemblies!

Required assemblies for both SharePoint v15 and v16:

  • MSOIDCLIL.DLL
  • MSOIDRES.DLL

SharePoint CSOM assemblies:

  • Microsoft.SharePoint.Client.dll
  • Microsoft.SharePoint.Client.Runtime.dll
  • Microsoft.SharePoint.Client.Taxonomy.dll

Whatever you release in a package, make sure you include the MSOIDCLIL.DLL and MSOIDRES.DLL assemblies!

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: