Error detecting project version - KB

​​​​UiPath throws exception "Error detecting project version"

Cause : This error usually occurs when the project is being developed with higher version of UiPath studio than the robot version where it is being run. 

Solution : Please note that UiPath doesn’t support forward compatibility which means a project developed in the higher version will not run on the lower version. 
Hence, either upgrade the robot to same version as studio or re-develop the workflow on development machine where you have same version of studio as robot version. 

If the above solution does not seem feasible for some reason, you can try below work-around on your robot machine but that might require some changes in the workflow:

1. Make a note of the current dependencies in the project. This can be done from the "Manage packages" window. Please ensure to make a note of the activity dependency version number also.

2. Take a backup and delete the project.json file found inside the project folder. (The project.json file also contains the record of the project dependencies that you would take a note of in Step 1, this can also be used as a reference) 

3. Re-launch the XAML file from the Enterprise Studio. This will re-build the project.json with the default versions of activity packages.

4. You might see some of the activities showing errors. This is because some activities have been changed in higher version. To fix this, you have to check if the activity package version noted in step 1 is compatible with robot version. If yes then you can upgrade the package version and should be able to see the activity. If not then you have to follow below steps :
          A. Open that xaml file in Development environment. 
          B. Locate the activity in question, note down the properties and delete. 
          C. Save the xaml and copy to robot machine. 
          D. Open the updated xaml file and add the activity again.
You have to follow the same steps for all the activities throwing error because of non-compatibility.