Library Publish Error (Could not load file or assembly 'Emgu.CV.World)

I am creating a library in UiPath Studio. As I got an error in Publish, I found that if I checked it, I got an error in the workflow with Deserualize JSON Array activity. Error and workflow are as attached. Does anyone know the workaround?

Error Message:
09:14:16.7897 => [ERROR] [UiPath.Studio.exe] [5] $LoadAssembly: UiPath.Vision, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null: System.IO.FileNotFoundException: Could not load file or assembly ‘Emgu.CV.World, Version=3.4.1.2984, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. 指定されたファイルが見つかりません。
File name: ‘Emgu.CV.World, Version=3.4.1.2984, Culture=neutral, PublicKeyToken=null’
at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
at System.Reflection.RuntimePropertyInfo.get_Signature()
at System.Reflection.RuntimePropertyInfo.get_PropertyType()
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.BinaryAssemblyLoader.#aFc(#Lrc #wAf, MemberInfo #xAf)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.BinaryAssemblyLoader.#cFc(#hsc #4Ub, Type #uAf)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.BinaryAssemblyLoader.#XEc(Assembly #sxc)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.BinaryAssemblyLoader.#iFc(Assembly #sxc)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.#30j(Assembly #sxc, IAssemblyName #4tc, IBinaryAssemblyMetadata #RDb)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.Create(Assembly assembly, IAssemblyName assemblyName, IBinaryAssemblyMetadata metadata)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.FileBasedAssemblyRepository.Create(Assembly assembly, IAssemblyName assemblyName, IBinaryAssemblyMetadata metadata)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.FileBasedAssemblyRepository.GetOrCreate(Assembly assembly, IAssemblyName assemblyName, String location)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.#uBh(Assembly #sxc, IAssemblyName #4tc, String #bVe)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.Load(Assembly assembly, IAssemblyName assemblyName)
at ActiproSoftware.Text.Languages.DotNet.Reflection.Implementation.AssemblyRepositoryBase.Load(String fullName)
at UiPath.Studio.Plugin.Workflow.ExpressionEditor.SyntaxService.LoadAssembly(LoadIntellisenseAssembliesContext context, String assemblyName, CancellationToken cancellationToken) in D:\a\1\s\Studio\UiPath.Studio.Plugin.Workflow\ExpressionEditor\SyntaxService.cs:line 419
Publish.Error.zip (8.9 KB)

I’m having this problem too, using Studio 18.4.5 and UiPath.WebAPI.Activities 1.4.1

I had wondered from the error if it was a namespace issue, but not convinced… The workflows run fine, they just won’t publish to library.

16:40:40.0000 => [ERROR] [UiPath.Studio.Shared.Logging.OutputLogger] [28] Invoke getUserSettings workflow: Cannot create unknown type ‘{http://schemas.uipath.com/workflow/activities}DeserializeJson({clr-namespace:Newtonsoft.Json.Linq;assembly=Newtonsoft.Json}JObject)’.

16:40:40.0000 => [ERROR] [UiPath.Studio.Shared.Logging.OutputLogger] [29] Get file env: Cannot create unknown type ‘{http://schemas.uipath.com/workflow/activities}DeserializeJson({clr-namespace:Newtonsoft.Json.Linq;assembly=Newtonsoft.Json}JObject)’.

Did you find a fix @Yoshihiko_Miyaichi ?

Hi @dmarshall , @Yoshihiko_Miyaichi

Great…

  1. Kindly update all the activities in your studio
  2. check whether you have all the activities like dependencies that are there in your studios,
    in this folder as well, C:\Users\AppData\Local\UiPath\Activities
    if not add them to this folder
  3. Finally kindly update the uipath.web.activities for deseralize json activity involved and check whether you have the namespace required for it in your studio.

Hope this would help you
Cheers…

Hi, those all looked fine, but we seem to have uncovered a fix.

If user creates a new library and then copy pastes workflow files (which use deserialise json activity) into the project, UiPath will flag the validation error (unknown activity). User then adds Uipath.web.activities to dependencies which fixes that error, but will the library will now crash when the user publishes the library.

To fix, just add the dependency before you copy paste the workflow in. Then it will publish fine.