Cannot load assembly: ClosedXML.dll : System.IO.FileLoadException: Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0

I have developed a process that works perfectly on 2 different developer machines, but when I ask our robots in both non-production and production to run the process it fails.
The message is: Read range (Settings and Constants sheets): Could not load file or assembly ‘DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

I have developed a Custom NuGet, that uses the above DocumentFormat.OpenXML version, but UiPath.Excel.Activities states that it should be 2.5.0

So why does it work with the developer machines, and not with the unattended robots? I have tried UiPath studio on the Non Production robot, open the project and got a failure about the ClosedXML, then I tried to add the UiPath.Excel.Activities (found a thread about it here on the forum, I deleted the nuget packages, and also tried to delete the entire folder) but this fails.

For future references: The issue was withing the NuGet package OpenXmlPowerTools. Once removed I had no further issues (except the custom code wasn’t working) I fixed this by adding the dll of OpenXmlPowerTools directly to my custom NuGet package.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.