Get credential activity issue on Uipath Version 2023.10.11

Getting below error while running the code. Require solution to fix this issue.

Get Credential: Could not load file or assembly ‘System.Diagnostics.DiagnosticSource, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51’. The system cannot find the file specified

@sunny.shelar

This issue is mostly due to a package dependency mismatch.

Please try:

  1. Clear NuGet cache (Close the studio and Rename packages folder to different name):
    %userprofile%\.nuget\packages
  2. Reopen the project and restore dependencies.
  3. Make sure UiPath.System.Activities is compatible with UiPath 2023.10.11.
  4. Republish the package and run it again on the robot.

If you recently upgraded activity packages, try downgrading them to a 2023.10 compatible version.

Thanks, Ravindra for sharing the solution.

I had done this but still getting the same.
In my code get credential activity is used twice. it is working for desktop application credential but not working for web application credential. so i’m also bit confused on this weird behavior

@sunny.shelar

If the Get Credential activity is working for one credential but failing for another, then it may not be only a package issue. Please check whether the web application credential asset exists in Orchestrator, the asset name is exactly matching in the code, and it is created in the correct folder/tenant. Also verify that the robot/user has access to that asset. As a test, you can delete and recreate the web credential asset and try again. Since the desktop credential is working, the issue may be with that specific asset, folder access, or the credential value itself.

If you still encoutering the issue, could you please share the screenshot of code snipping and orchestrator asset setup?

It seems that either the project was created/compiled in a .NET 8 robot or Studio (from 24.10.x+), or you used some activities (especially UiPath.System.Activities and/or UiPath.UiAutomation.Activities) from 24.10.x/25.10.x and up, which have .NET 8 support.
The robot 23.10.x has only .NET 6 support.

Make sure that either you are downgrading the project activities to 23.10.x or upgrading the Studio/robot to 24.10.x or 25.10.x and its activities to 24.10.x or 25.10.x and retrying in the current project.

@sunny.shelar

Please take a look below threads,

Hope these posts will help you.

If you find this helpful, please mark it as soultion.
Thanks.

Hi Ravindra,
I have checked the name of the asset. it is same as mentioned the orchestrator. Even I recreated new asset and tried to pass it via config but it was giving me same error. but when I pass the asset name directly to the activity it was working but again it started giving me same error.

Thanks Yedukondaluaregala for sharing this solution.

Will check and let you know