Cannot add Microsoft.SharePointOnline.CSOM


#1

Hi,
I’m using Microsoft.SharePointOnline.CSOM package as a dependency in my custom activities package. As long as I added Nuget package source, it worked in Studio 18.1. But when I tried to do same in Studio 18.4, even when I try to install just this package, I get following error:

Cannot load assembly: C:\Users\ROMBU\.nuget\packages\microsoft.sharepointonline.csom/16.1.8029.1200\lib/net45/Microsoft.SharePoint.Client.Runtime.Windows.dll : System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SharePoint.Client.Runtime.Portable, Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.SharePoint.Client.Runtime.Portable, Version=16.1.0.0, 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 249
   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

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

I have checked that the files can be found in that location, so they are installed, but cannot be loaded.
As you can see, there are both “\” “/” characters in assembly path, which might have thrown System.IO.FileNotFoundException.

Can I solve this? If yes, how?