Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 2012 &引用;以下路径包含的字符超过了允许的259个;删除文件时在门控生成上_Visual Studio 2012_Msbuild - Fatal编程技术网

Visual studio 2012 &引用;以下路径包含的字符超过了允许的259个;删除文件时在门控生成上

Visual studio 2012 &引用;以下路径包含的字符超过了允许的259个;删除文件时在门控生成上,visual-studio-2012,msbuild,Visual Studio 2012,Msbuild,我将VS 2012与TFS 2012一起使用。我正在签入一组更改,包括删除具有长组合路径/文件名的文件。门控生成失败,原因是: Exception Message: TF400889: The following path contains more than the allowed 259 characters: C:\Builds\10\MFirstPartOfMyPath>\__Unmapped__\78118\<SecondPartOfMyPath>\<MyFil

我将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)
异常消息:TF400889:以下路径包含的字符超过了允许的259个字符:C:\Builds\10\MFirstPartOfMyPath>\\uuu Unmapped\u78118\.sql。指定较短的路径。(类型InvalidPathException)
异常堆栈跟踪:
服务器堆栈跟踪:
位于Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(字符串路径)
在Microsoft.TeamFoundation.Common.FileSpec.GetFullPath(字符串路径,布尔checkForIllegalDollar)
位于Microsoft.TeamFoundation.VersionControl.Client.Workspace.Map(字符串serverPath,字符串localPath)
位于Microsoft.TeamFoundation.Build.Workflow.Activities.TfWorkfold.RunCommand(VersionControlScope VersionControlScope,Workspace Workspace,TfWorkfoldAction操作,字符串serverPath,字符串localPath)
在System.Runtime.Remoting.Messaging.StackBuilderSink.\u PrivateProcessMessage(IntPtr md,对象[]参数,对象服务器,对象[]和输出参数)
在System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg,IMessageSink replySink)中
在[0]处重试异常:
at System.Runtime.Remoting.proxy.RealProxy.EndInvokeHelper(消息reqMsg,布尔bProxyCase)
at System.Runtime.Remoting.proxy.RemotingProxy.Invoke(对象未使用,MessageData&msgData)
在System.Action`5.EndInvoke处(IAsyncResult结果)
位于Microsoft.TeamFoundation.Build.Workflow.Activities.TfWorkfold.EndExecute(AsyncCodeActivityContext上下文,IAsyncResult结果)
在System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,BookmarkManager BookmarkManager)中
内部异常详细信息:
异常消息:指定的路径、文件名或两者都太长。完全限定文件名必须少于260个字符,目录名必须少于248个字符。(键入PathTooLongException)
异常堆栈跟踪:位于System.IO.PathHelper.GetFullPathName()处
在System.IO.Path.NormalizePath(字符串路径、布尔fullCheck、Int32 maxPathLength)
在System.IO.Path.GetFullPath(字符串路径)处
位于Microsoft.TeamFoundation.Common.FileSpec.GetFullPathWrapper(字符串路径)
如果我试图添加这样的文件,我可以理解这一点,但是签入尝试删除一个已经存在的文件。如何解决此错误?

诀窍是:

  • 撤消删除操作
  • 将文件重命名为较短的名称
  • 签入(触发生成)
  • 获取最新信息
  • 删除该文件
  • 登记入住