Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

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

$
0
0
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

Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>