Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/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 Visual Studio 2008引用太长?_Visual Studio_Visual Studio 2008_Reference - Fatal编程技术网

Visual studio Visual Studio 2008引用太长?

Visual studio Visual Studio 2008引用太长?,visual-studio,visual-studio-2008,reference,Visual Studio,Visual Studio 2008,Reference,我最近重新组织了我们的源代码管理,发现我们的一个解决方案不再构建。我们得到的唯一错误是: 错误65未知生成错误,' 指定的路径、文件名或两者都不可用 太长了。完全限定文件 名称必须少于260个字符, 并且目录名必须小于 超过248个字符。” 我在VisualStudio中查看了每个引用,每个引用的最长完整路径(路径和文件名)是161个字符 因此,我的解决方案文件夹结构是: C:\projects\u svn\ABC\branchs\01.02.03\ABC\ABC 套件\ABC.DEF.GHIJ

我最近重新组织了我们的源代码管理,发现我们的一个解决方案不再构建。我们得到的唯一错误是:

错误65未知生成错误,' 指定的路径、文件名或两者都不可用 太长了。完全限定文件 名称必须少于260个字符, 并且目录名必须小于 超过248个字符。”

我在VisualStudio中查看了每个引用,每个引用的最长完整路径(路径和文件名)是161个字符

因此,我的解决方案文件夹结构是:

C:\projects\u svn\ABC\branchs\01.02.03\ABC\ABC 套件\ABC.DEF.GHIJKLM.NOP\

任何帮助将不胜感激,我不觉得这个文件夹结构太长,考虑到项目的规模,并组织得更好

以下是一些可能有帮助的技术细节(如果您需要更多,请告诉我): 在Windows XP或Windows 7上运行的Visual Studio 2008 SP 2。使用Subversion作为SCM。用C#/WPF编码


谢谢

我认为这里可能发生的情况是,您的一个项目正在使用一个相对的提示路径,该路径在树的后面非常远,然后在目录结构的后面。比如说

c:\foo\bar\baz\..\some\other\dir\foo.dll

即使实际文件的路径小于256,但相对的错误会使其更长


查找这些文件的最佳方法是在所有.csproj/.vbproj文件中搜索字符串
。\..\
。看看有没有结果

> P>您还需要考虑Svn的“后台”文件。 虽然我可能有这样一个简短的文件名: c:\myfolder1\myfolder2\MyFile.txt

可能有一个较长的文件名版本,如下所示: c:\myfolder1\myfolder2.svn\text base\MyFile.txt.svn-base

而那个背景文件就是那个出现“太长”错误的文件

以下是我使用SVN源代码管理通过CCNET(调用MSBUILD文件)获得的信息。 删除特定名称以保护无辜者。(还有我的工作!)

请注意,这种“名称按摩”会导致较短的路径,可能不会产生错误。Aka,不要计算我的示例中的字符数。 但是错误信息就是我得到的

    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.

那个文件夹里有什么?我没有在该文件夹中看到任何
.cpp
是.sln文件和我的项目文件(.cs、.wpf等)。谢谢Jared,可能就是这样。不幸的是,我看不出是哪一个导致了这个问题。太棒了,谢谢你的帮助。你的建议让我把范围缩小到了一对夫妇,我发现了哪些引用引起了问题。