I am using VS 2012 with TFS 2012. I am checking for a number of changes that include deleting a file with a long combined path / file name. Build failure fails with:
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)
I could understand this if I tried to add such a file, but registration tries to delete the one that already exists. How can I get around this error?
source share