Visual Studio和一个项目引用路径的最大长度路径、长度、项目、最大

由网友(霸气爷们灬拳)分享简介:我们有一些项目,并在文件夹结构中的每个生命深。当一组项目需要引用一个项目在不同的文件夹中,基准可能会失败,因为相对路径是在VS太长。We have a number of projects, and each lives deep in a folder structure. When one set of pro...

我们有一些项目,并在文件夹结构中的每个生命深。当一组项目需要引用一个项目在不同的文件夹中,基准可能会失败,因为相对路径是在VS太长。

We have a number of projects, and each lives deep in a folder structure. When one set of projects needs to reference a project in a different folder, the reference can fail because the relative path to is in VS is too long.

例如,项目1将是:

C: folderA 文件夹1 FOLDER2 ... folderN myProject1.csproj

C:folderAfolder1folder2...folderNmyProject1.csproj

它引用了另一个项目:

C: FolderB中文件夹1 FOLDER2 ... folderN myProject2.csproj

C:folderBfolder1folder2...folderNmyProject2.csproj

在HintPath到基准存储为相对路径,如............ FolderB中文件夹1 FOLDER2 ... folderN myProject2.csproj

The HintPath to the reference is stored as a relative path, as in ............folderBfolder1folder2...folderNmyProject2.csproj

当VS加载溶液,它无法解决的参考,因为它建立的绝对路径包括许多../'s使得路径超过256个字符。而构建失败。

When VS loads the solution, it can't resolve the reference because the absolute path it builds includes numerous ../'s such that the path exceeds 256 characters. And the build fails.

我们通过编辑的csproj和投入绝对路径,这仅仅是愚蠢的解决它。

We fix it by editing the csproj and putting in an absolute path, which is just silly.

什么是最好的解决方案呢?

What is the best solution for this?

推荐答案

答案很简单 - 不这样做,也不会受到伤害。考虑较少的深层次结构,使相关项目,以接近生活。

Short answer - don't do that and it will not hurt. Consider less deep hierarchies and make related projects to live close.

MSBuild的是管理的应用程序和CLR有限制的约256个字符的路径/文件名长度...

MSBuild is managed application and CLR have restriction on path/file name length of about 256 characters...

阅读全文

相关推荐

最新文章