Why the .nuget/packages file contents are erased in the middle of automation execution?

Why all my .nuget/packages folder contents are getting deleted during workflow execution?

Issue Description

The automation may fail with such errors:

MyWorkflowName.xaml failed: Could not find a part of the path 'C:\Users\myrobotusername\.nuget\packages\my_performer\x.0.xx\lib\net45\Framework\MyWorkflowName.xaml' 

Root Cause

In some use cases, temporary workstations for developers are provisioned, such as Workplace as a Service (WPaaS) environment. Deleting all the .nuget file contents is preferred before the start of a process execution so that the dependencies are downloaded fresh. The delete script in some scenarios may not trigger before the process execution but starts a few minutes after the process execution starts. In this case, the .nuget file contents get erased and the process fails

Resolution

Check the execution start time of the deletion scripts and adjust its execution accordingly.