0
votes

I'm implementing CI/CD for my application through TFS 2015, Windows server 2012 R2. My CI pipeline is success and my Release failed with 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.

I tried with both VSBuild and MSBuild task in Release pipleine, still the same issue.Find the error log

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.

Any help would be appreciated.

1
well, make the path shorter? where did you install the agent to? - 4c74356b41
windows 2012 R2 server [Same TFS server] - Shalem
i'm asking about the path, not server version - 4c74356b41
IN C Drive C:\TFSAgent - Shalem
try starting the build with diagnostics\debug enabled and see if you can get any meaningful output - 4c74356b41

1 Answers

0
votes

Microsoft has released fix for this long path issue. Please find the post here in Developer community.

According to this, need to download latest version of Visual studio.