Regarding issue with the dll

Hi Team,

I am trying to publish a message using a C# code. It is compiling correctly, but when I run it. It gives me error. By the looks libsolclient.dll is missing. Can you please help me?>

Error Message

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> SolaceSystems.Solclient.Messaging.FatalErrorException: Error encountered in interop adapter Unable to load DLL 'libsolclient' or one of its dependencies: The specified module could not be found. (0x8007007E) In method: Init ---> System.DllNotFoundException: Unable to load DLL 'libsolclient' or one of its dependencies: The specified module could not be found. (0x8007007E) at SolaceSystems.Solclient.Messaging.Native.Interop.SolaceNativeAPI.LogSetCallback(LogCallbackHandler callback, IntPtr user)
at SolaceSystems.Solclient.Messaging.Native.MAdapter.MSolClientSetLogCallback(LogCallbackHandler callback, IntPtr user)
--- End of inner exception stack trace ---
at SolaceSystems.Solclient.Messaging.Native.MAdapter.MSolClientSetLogCallback(LogCallbackHandler callback, IntPtr user)
at SolaceSystems.Solclient.Messaging.Native.ContextFactoryImpl.Init(ContextFactoryProperties props)
at SolaceSystems.Solclient.Messaging.Adapter.ContextFactoryAdapter.Init(ContextFactoryProperties props)
at SolaceSystems.Solclient.Messaging.ContextFactory.Init(ContextFactoryProperties props)
at UiPath.CodeRunner.UiPathCodeRunner_b4bb54c749e24bfebea465d72742db6a.Run()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
at UiPath.Activities.System.Utilities.InvokeCode.CompilerRunner.Run(Object[] args)
at UiPath.Activities.System.Utilities.InvokeCode.NetCodeInvoker.Run(String userCode, List
1 inArgs, IEnumerable`1 imps, Object[] args)
at UiPath.Core.Activities.InvokeCode.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Comments

  • allmhhuran
    allmhhuran Member Posts: 47 ✭✭✭

    Have you tried manually restoring nuget packages? Are you building for a windows target? The libsolclient.dll is provided by the SolaceSystems.SolClient.Messaging package. You can see it here https://nuget.info/packages/SolaceSystems.Solclient.Messaging/10.24.0 under the build\net20\win-x64 (or win-x86) directories.

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 638 admin
    edited April 23 #3

    And even if you downloaded the API from our downloads page, it's still bundled in there too:

    solclient_dotnet_10.24.0$ find . -name "libsolclient.dll"
    ./bin/Win32/libsolclient.dll
    ./bin/Win64/libsolclient.dll
    ./runtimes/win-x64/native/libsolclient.dll
    ./runtimes/win-x86/native/libsolclient.dll
    

    So maybe just a "classpath" (Java speak) issue, something wrong with project config?

  • allmhhuran
    allmhhuran Member Posts: 47 ✭✭✭

    Actually, I see the root of your exception is UIPath invoking code. I suspect the solution to your problem is determining how to properly register external dll's for UIPath to be able to invoke that code. Ie, it looks more like a UIPath configuration issue than a csproj issue.

  • amitbhatt
    amitbhatt Member Posts: 2

    Hi,

    Thank you for your prompt response. I included solacesystems.solclient.messaging.10.24.0.nupkg to the project, which is why it compiles successfully. As you correctly pointed out, libsolclient.dll is also included in the same package. I'm not sure why it isn't taking the specified dll at runtime.