My DNU publish step is failing in TeamCity due to the path length eventually getting out of control:
[14:35:29][Step 1/1] Using Package dependency Microsoft.Extensions.Configuration.FileProviderExtensions 1.0.0-rc1-final
[14:35:29][Step 1/1] Source C:\Users\TFSSERVICE\.dnx\packages\Microsoft.Extensions.Configuration.FileProviderExtensions\1.0.0-rc1-final
[14:35:29][Step 1/1] Target D:\TeamCity\buildAgent\work\31745f64510dfced\artifacts\Company.Auth.IdentityProvider\approot\packages\Microsoft.Extensions.Configuration.FileProviderExtensions\1.0.0-rc1-final
[14:35:29][Step 1/1] Using Package dependency Microsoft.Extensions.FileSystemGlobbing 1.0.0-rc1-final
[14:35:29][Step 1/1] Source C:\Users\TFSSERVICE\.dnx\packages\Microsoft.Extensions.FileSystemGlobbing\1.0.0-rc1-final
[14:35:29][Step 1/1] Target D:\TeamCity\buildAgent\work\31745f64510dfced\artifacts\Company.Auth.IdentityProvider\approot\packages\Microsoft.Extensions.FileSystemGlobbing\1.0.0-rc1-final
[14:35:29][Step 1/1] Error: 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 248 characters.
[14:35:29][Step 1/1] Process exited with code 1
[14:35:29][Step 1/1] Step DNU publish (Command Line) failed
I have already updated my checkout rules agent path to root the project closer to the build agent directory.
A possible solution could be to set the publish output to be something closer to the drive root. However, the TeamCity DNU publish build step does not support changing the output directory. Additionally, I would then be responsible for managing this directory.
An ideal solution would involve the least amount of manual configuration to the build agent, as I have several of them.