Cannot install Microsoft.SharePointOnline.CSOM


Trying to install Microsoft.SharePointOnline.CSOM from

Steps to reproduce:

  • Open manage packages.
  • Select
  • Search for CSOM.
  • Click install after selecting Microsoft.SharePointOnline.CSOM by Microsoft.

Current Behavior:

Installation fails with the following message.


The following package(s) can not be installed: 
Microsoft.SharePointOnline.CSOM 16.1.8810.1200

Cannot load assembly: C:\Users\UserName\.nuget\packages\microsoft.sharepointonline.csom/16.1.8810.1200\lib/net45/Microsoft.SharePoint.Client.Runtime.Windows.dll : System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Client.Runtime.Portable, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.SharePoint.Client.Runtime.Portable, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
   at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
   at System.Reflection.RuntimeAssembly.GetExportedTypes()
   at UiPath.Studio.Plugin.Workflow.Services.AssemblyContainer.AddAssemblyInternal(Assembly assembly, String path) in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Services\AssemblyContainer.cs:line 224
   at UiPath.Studio.Plugin.Workflow.Services.AssemblyContainer.LoadAssemblies(String[] paths, IAppDomainCancellationToken cancellationToken) in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\Services\AssemblyContainer.cs:line 98

Expected Behavior:

Should install the package successfully.

Studio/Robot/Orchestrator Version:

Studio Version: 2019.4.2
OS Version: Windows 10

Hi @KannanSuresh

Could you give this solution a try?

Especially this post:

1 Like

Hi @loginerror,

Thanks a lot for the quick reply.

I am aware of this workaround. However, this is not practical if we need to deploy some custom activities involving this nuget package.

Another workaround would be to repackage it and use.

It seems this is not an issue with UiPath. However, please note, this issue occurs when I try installing it on UiPath. It works without issues if I use it in a C# solution in Visual Studio.

Hi, did you ever come up with a good solution for this problem?

No. As of now repackaging is the only option I see.

Thats was what i did, sad thing this nugget package seems to be bad and having wrong dependencies…