Post publishing/ moving the package from on environment to another, installation of package is throwing below error. Could not load type 'System.Activities.TextExpressionBase`1' from assembly 'UiPath.Workflow, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null' .
Symptom: The following error may be encountered in the UiPath Orchestrator and/or UiPath Assistant logs,
Could not load type ‘System.Activities.TextExpressionBase`1’ from assembly ‘UiPath.Workflow, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null’
Root Cause: One of the primary reasons for encountering this compatibility error is the mismatch between the UiPath Robot version and the UiPath Studio version.
As mentioned in UiPath Compatibility Matrix documentation, forward compatibility is not supported, meaning projects developed in newer Studio versions may not function properly with older Robots versions. In this scenario, the Robot will not be able to resolve the packages and their dependencies.
Example Scenario: For instance, consider a scenario where a process was developed in a Studio environment running version 2023.10.0. However, this process is deployed in a production environment using UiPath Assistant version 2023.4.1.
Resolution: To mitigate this compatibility issue, the following options can be explored,
- Update the Robot Version
- The optimal solution is to update the Robot to a version that matches with the development Studio version
- This ensures that the package dependencies are consistent, and compatibility issues are avoided.
- Package Version Management
- Examine the package versions used in the project
- Ensure that these packages are compatible with both Studio and Robot
- Consider downgrading the package versions in the project to align with the Robot's environment.
- For the example scenario, use UiPath.System.Activities 2023.4.X instead of UiPath.System.Activities 2023.10.X.
-
- If updating the Robot version is not feasible, downgrade the development version of UiPath Studio to match the Robot's version
- This ensures compatibility but may limit your access to newer features and improvements in the latest Studio versions.
Additional Information:
- In general, it is advisable to keep both Studio and Robot versions in sync to prevent compatibility problems. Upgrading or downgrading one component to match the other is typically the most straightforward solution
- If a specific version of UiPath Studio/Assistant is required, reach out to the UiPath Support Team, and they will provide with the necessary download links
- Another reason for the "could not load type x package" error comes when the package is not available or downloaded or facing issue in accessing the package due to access-related issues or authentication. As part of troubleshooting, check whether that package related to activity throwing error is available in %userprofile%\.nuget\package folder and has full permission to access it.
Conclusion: Ensuring compatibility between the versions of UiPath Studio and Robot facilitates the seamless deployment and execution of automation projects. This practice minimizes compatibility issues and enhances the overall performance of RPA solutions.