The specified path, file name, or both are too long. The fully qualified file
name must be less than 260 characters, and the directory name must be less than
The guide here below will help you to avoid these. But you should also keep in mind not to make your folder structure to complex or too deep. You can group your projects in your solution using solution folders which are not reflected in your physical project location.
Working Directory Build Agent
Set the working Directory for the Build Agent to a path that is not to long (e.g. C:\BuildWorkSpace\$(BuildDefinitionPath). Be aware to add the $(BuildDefinitionPath) variable in order for every build to be stored in a unique location.
Note: this will be replacing the $(SourceDir) variable. (see below)