TFS CD错误:指定的路径,文件名或两者都太长。

时间:2018-12-02 07:35:29

标签: tfs azure-devops tfs2015 continuous-deployment

我正在通过TFS 2015,Windows Server 2012 R2为我的应用程序实现CI / CD。我的CI管道成功,我的发布失败,并显示错误

  

指定的路径,文件名或两者都太长。充分   限定的文件名必须少于260个字符,并且   目录名称必须少于248个字符。

我在pipleine版本中尝试了VSBuild和MSBuild任务,仍然是同一问题。查找错误日志

2018-12-01T14:39:03.3631640Z Downloading artifact from file share: \\xxxxxxxx\xxxxxxxxxxxx\drop

2018-12-01T14:40:42.8336659Z ##[section]Error: System.IO.PathTooLongException: 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.

2018-12-01T14:40:42.8346665Z    at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)

2018-12-01T14:40:42.8346665Z    at System.IO.Path.InternalGetDirectoryName(String path)

2018-12-01T14:40:42.8356644Z    at Microsoft.TeamFoundation.Release.Windows.Implementation.FileSystem.WriteStreamToFile(Stream stream, String filePath)

2018-12-01T14:40:42.8356644Z    at Microsoft.TeamFoundation.Release.ArtifactRepository.FileShare.FileShareArtifact.DownloadArtifact(ArtifactDefinition artifactDefinition, String dropLocation, String localFolderPath)

2018-12-01T14:40:42.8356644Z    at Microsoft.TeamFoundation.Release.ArtifactRepository.Build.BuildArtifact.DownloadArtifact(BuildArtifact buildArtifact, ArtifactDefinition artifactDefinition, String localFolderPath, BuildHttpClient buildClient, Int32 buildId)

2018-12-01T14:40:42.8366844Z    at Microsoft.TeamFoundation.Release.ArtifactRepository.Build.BuildArtifact.Download(ArtifactDefinition artifactDefinition, String localFolderPath)

2018-12-01T14:40:42.8366844Z    at Microsoft.TeamFoundation.Release.ArtifactRepository.Common.AgentArtifactDownloader.Download(ArtifactDefinition artifactDefinition, Uri workingFolder)

2018-12-01T14:40:42.8366844Z    at Microsoft.TeamFoundation.DistributedTask.Plugin.Release.ReleaseJobExtension.<>c__DisplayClass19_1.<DownloadArtifacts>b__1()

2018-12-01T14:40:42.8376646Z    at Microsoft.TeamFoundation.Release.Windows.Implementation.RetryExecutor.Execute(Action action)

2018-12-01T14:40:42.8376646Z    at Microsoft.TeamFoundation.DistributedTask.Plugin.Release.ReleaseJobExtension.DownloadArtifacts(ITaskContext downloadArtifactTaskContext, IJobContext context, IList`1 agentArtifactDefinitions, Uri artifactsWorkingFolder, String teamProjectId, IDictionary`2 savedSettings)

2018-12-01T14:40:42.8376646Z    at Microsoft.TeamFoundation.DistributedTask.Plugin.Release.ReleaseJobExtension.DownloadArtifactsWrapper(IJobContext context, IJobRequest job, CancellationToken cancellationToken, ITaskContext downloadArtifactTaskContext, String teamProjectId, Uri artifactsWorkingFolder, Int32 releaseId, IDictionary`2 savedSettings)

2018-12-01T14:40:42.8456644Z ##[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.

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

Microsoft已发布针对此长距离问题的修复程序。请在开发者社区中找到帖子here

因此,需要下载Visual Studio的最新版本。