简体   繁体   中英

VC++ VS2013 project not compiling after moving from non- version control folder to a version control folder

Hi I've aa 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/"

All the projects are compiling fine here.

Now, I moved this "" folder from the non source version control location to a source version control location "perforce" say " Documents/P4_workspaces/WorkspaceABC/".

I see that 1 project of out 4 projects in this *.sln doesn't compile fine.

Instead it throws an error like this & doesn't even start compilation ::

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 ==========

The errors says that the file name is too long, but the very same project was compiling perfectly fine in another non-source control location. Also I don't find this file " Release\\ProectABC.vcxproj.FileListAbsolute.txt " anywhere.

After refering to this link I got a hint that this has something to do with the change in location of teh file. Link

Any help would be really helpful. Thanks.

When you changed the location of the source you may change the size of the path of the root directory, example:

If origin source location was: C:\\A\\B (path size 6) and you moved or copied to C:\\D\\E\\F\\G (path size 10), you are adding 10-6=4 characters to all the path of files in the source, if you previously have a file with path length 258 and add the new 4 would exceed the limit (260) . So before there is no problem compiling and now the limit is reached.

Check what is the length of the path to the reported file Release\\ProectABC.vcxproj.FileListAbsolute.txt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM