由于路径长度最终失控,我的 DNU 发布步骤在 TeamCity 中失败:
[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
我已经更新了我的结帐规则代理路径,以使项目更接近构建代理目录。
一种可能的解决方案是将发布输出设置为更接近驱动器根目录。但是,TeamCity DNU 发布构建步骤不支持更改输出目录。此外,我将负责管理此目录。
一个理想的解决方案是对构建代理进行最少的手动配置,因为我有几个。