Orchestrator upgarde fails with error in log as " The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters"

Orchestrator upgarde fails with error in log as " The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters"

While performing an upgrade of Orchestrator it fails with the below error.  The upgrade was performed from version 2018.3.3 to 2018.4.5 . However if it applicable to all the version upgrade. 

Error:- 

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters

Solution:- 
1) While performing the upgrade , a back up is taken in the temp folder which is present local user profile \ appdata
2) In the current scenario it was found out that the nugetpackage had a lot of  packages inside tenant , and since it were getting copied to the temp folder which was exceeding the path file length ( more than 260) 
3) Take a  back up all the files from the nuget package folder , and then perform the upgrade 
5) After the upgrade we copied all the nuget package files. 

Solution 2:-
1) Change the temp folder location from the userprofile to a shorter path. You can see the existing location in environment variable . Change the value of the "Temp" variable to shorter path.


2) Restart the machine . 
3) Try to perform the upgrade.