Why do some automations return a "Duplicate assembly" error?
Description: An error is displayed in Event Viewer when running a process that references the same assembly from multiple packages: "Duplicate assembly: \%userprofile%\.nuget\packages\uipath.mail.activities\1.13.0-preview\lib/net5.0-windows7.0/Office.dll."
This error has been reproduced using UiPath.Excel.Activities v 2.12.0-Preview and Mail 1.13.1-preview in a single project, along with older versions, including Excel 2.11.4 and with Mail 1.12.3.
Root Cause:
This error is not expected to impact automations. This is by design to discourage the practice of having assemblies referenced multiple times, which may also depend on different versions of the assembly.
The indication will vary by the .Net version used:
- For Net4.6.1, this is reported as a warning (Trace.Information)
- For Net5.0, this is reported as an error (Trace.TraceError).
Resolution:
- This error can be ignored unless the automation is failing with no other errors.
In this case, share the Robot log and Application Event Viewer log from the Robot machine capturing the error.