您还需要考虑 SVN 的“背景”文件。
虽然我可能有一个像这样的短文件名:
c:\myfolder1\myfolder2\MyFile.txt
可能在某处潜伏着更长的文件名版本,如下所示:
c:\myfolder1\myfolder2.svn\text-base\MyFile.txt.svn-base
那个背景文件是得到“方式太长”错误的那个。
这是我使用 SVN 源代码控制通过 CCNET(调用 MSBUILD 文件)得到的。
删除特定名称以保护无辜者。 (还有我的工作!)
请注意,这种“名称按摩”会导致路径更短,可能不会产生错误。又名,不要计算我按摩示例中的字符数。
但错误消息是我得到的。
Removing directory "C:\CCNETEnvironment\MyFolder2\MyProject\working\checkout".
C:\src\MyFolder1\MyProject\My_MSBuild.xml(173,5): error MSB3231: Unable to remove directory "prop-base". 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.
C:\src\MyFolder1\MyProject\My_MSBuild.xml(173,5): error MSB3231: Unable to remove directory "text-base". 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.
C:\src\MyFolder1\MyProject\My_MSBuild.xml(173,5): error MSB3231: Unable to remove directory "prop-base". 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.
C:\src\MyFolder1\MyProject\My_MSBuild.xml(173,5): error MSB3231: Unable to remove directory "text-base". 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.
C:\src\MyFolder1\MyProject\My_MSBuild.xml(173,5): error MSB3231: Unable to remove directory "C:\CCNETEnvironment\MyFolder2\MyProject\working\checkout". Could not find a part of the path 'MyFile.txt.svn-base'.
Done building target "Clean" in project "My_MSBuild.xml" -- FAILED.