I'm still researching the answer for this, so may end up answering my own question, but I have the following problem:
Some NuGet packages (in my case Microsoft.Diagnostics.Tracing.EventRegister) contain .exe files that are executed as part of the build. The .targets file gets copied across to the grid node server to be included in the build but the .exe file (that it needs to run) doesn't.
I'm either looking for a way to disable this .targets file from being run, ignoring the error so that the project continues to build, or copying the .exe (and other files needed from the packages folder) so that the command runs successfully.