Friday, October 9, 2015

PowerShell Error: Add-Type: Could not load file or assembly 'file:///C:\Program Files\Common Files\Micros oft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded

Problem: 
When trying to write a client side PowerShell script for SharePoint online, got an error:

Error: Add-Type : Could not load file or assembly 'file:///C:\Program Files\Common Files\Micros
oft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll' or one of its  dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

Add-Type: Could not load file or assembly
Verified SharePoint Server 2013 Client Components SDK is already installed to use Client side assemblies. (if not,  You can download it from: http://www.microsoft.com/en-us/download/details.aspx?id=35585)

Solution:
You need to have PowerShell 3.0 to use Client side assemblies of SharePoint online. So, download and install "Windows Management Framework 3.0" at https://www.microsoft.com/en-us/download/details.aspx?id=34595

Tips: To get your currently installed PowerShell version, type: $PSVersionTable



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...