【问题标题】:"The following path contains more than the allowed 259 characters" on gated build when deleting a file删除文件时,门控构建中的“以下路径包含超过允许的 259 个字符”
【发布时间】:2013-07-24 14:08:12
【问题描述】:

我将 VS 2012 与 TFS 2012 一起使用。我正在检查一组更改,其中包括删除具有长组合路径/文件名的文件。封闭式构建失败:

Exception Message: TF400889: The following path contains more than the allowed 259 characters: C:\Builds\10\MFirstPartOfMyPath>\__Unmapped__\78118\<SecondPartOfMyPath>\<MyFileName>.sql. Specify a shorter path. (type InvalidPathException)
Exception Stack Trace: 
Server stack trace: 
   at Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(String path)
   at Microsoft.TeamFoundation.Common.FileSpec.GetFullPath(String path, Boolean checkForIllegalDollar)
   at Microsoft.TeamFoundation.VersionControl.Client.Workspace.Map(String serverPath, String localPath)
   at Microsoft.TeamFoundation.Build.Workflow.Activities.TfWorkfold.RunCommand(VersionControlScope versionControlScope, Workspace workspace, TfWorkfoldAction action, String serverPath, String localPath)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at System.Action`5.EndInvoke(IAsyncResult result)
   at Microsoft.TeamFoundation.Build.Workflow.Activities.TfWorkfold.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
   at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Inner Exception Details:

Exception Message: 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. (type PathTooLongException)
Exception Stack Trace:    at System.IO.PathHelper.GetFullPathName()
   at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength)
   at System.IO.Path.GetFullPath(String path)
   at Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(String path)

如果我尝试添加这样的文件,我可以理解这一点,但签入尝试删除已经存在的文件。如何解决此错误?

【问题讨论】:

    标签: visual-studio-2012 msbuild


    【解决方案1】:

    诀窍是:

    1. 撤消删除
    2. 将文件重命名为更短的名称
    3. 签入(触发构建)
    4. 获取最新信息
    5. 删除文件
    6. 签到

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-10
      • 2018-11-28
      • 2017-05-18
      • 2016-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多