Hi I've a a solution (VS2013, vc++) which has 4 projects (*.vcproj) & each of them being a EXE project. This is saved in a non-source version control location in my win8 machine:: Say in "Documents/NoSourecControlFolder/"
所有项目在这里都编译良好。
Now, I moved this "" folder from the non source version control location to a source version control location "perforce" say " Documents/P4_workspaces/WorkspaceABC/".
我看到此 *.sln 中的 4 个项目中有 1 个项目无法正常编译。
相反,它会抛出这样的错误,甚至不会开始编译::
1>------ Rebuild All started: Project: ProectABC, Configuration: Release Win32 ------
1>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(4341,5): error MSB3491: Could not write lines to file "Release\ProectABC.vcxproj.FileListAbsolute.txt". 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.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
错误表明文件名太长,但同一个项目在另一个非源代码控制位置编译得很好。我也没有在任何地方找到这个文件“Release\ProectABC.vcxproj.FileListAbsolute.txt”。
在引用这个链接后,我得到一个提示,这与文件位置的变化有关。 Link
任何帮助都会很有帮助。谢谢。
最佳答案
当您更改源的位置时,您可能会更改根目录路径的大小,例如:
如果原始源位置是:C:\A\B(路径大小 6)并且您移动或复制到 C:\D\E\F\G (路径大小 10),如果您之前有一个路径长度为 258 的文件并且添加新的 4 会超出限制 (260)。所以之前编译没有问题,现在已经达到限制了。
检查报告文件路径的长度是多少 Release\ProectABC.vcxproj.FileListAbsolute.txt
关于c++ - 从非版本控制文件夹移动到版本控制文件夹后,VC++ VS2013 项目无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24786032/