Dependency upgrade breaks automation


I have an automation that has a dependency on a library that I created. I’ve been pushing frequent updates to the library and upgrading the package on the automation just fine. Both the automation and the library are connected to TFS for source code preservation :wink:
Today I switched computers, so UiPath was reinstalled, connected to Orchestrator and licensed just fine. Checked out the code from TFS. After pushing a new update to my library, the main automation started spitting an exception like this:

03/23/2020 21:34:27 => [Error] Main.xaml: The private implementation of activity ‘1.187: XXX Account Termination Process Date’ has the following validation error: Compiler error(s) encountered processing expression “new FileInfo(Type.GetType(“AFLib.Util.AF_Command, AFLib”).Assembly.Location).Directory.FullName”.
Type ‘FileInfo’ is not defined.

“AF Command” is an .xaml that is marked as private within the library under a folder named Util and is used in several .xaml files as linked workflow. The .xaml does not use any sort of FileInfo object.

The message suggests to me that some linking between the automation and the library went awry, but I have no idea how to fix it. I’ve tried so far:

  1. Reverting back and forth the version of the dependency (everything works fine with previous version of the dependency)
  2. Re-working the application (pulling in the activity again, setting inputs/outputs)
  3. Repair dependency option shows grayed out.
  4. Removing and re-adding dependency
  5. Pushing a new version of the dependency with some changes and updating it in the main automation.
  6. Double checked activities version and both library and automation are at the same level (Excel.Activities = 2.7.2, Mail.Activities = 1.72, System.Activities = 19.10.1, UIAutomation.Activities = 19.11.1)

None of this has made any difference. I would really appreciate any pointers in to how to solve this.

@pedro.arroyo You can try to add “System.IO” to namespaces inside “AF Command.xaml”,
from “Imports”. It seems that “FileInfo” type is not found inside any namespaces used by your xaml.

@Gino, thank you! That solved the issue.

Wonder why did that class got lost in translation.

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