Visual Studio未知的生成错误。完全限定的名称必须少于260个字符 [英] Visual Studio unknown build error. The fully qualified name must be less than 260 characters

查看:530
本文介绍了Visual Studio未知的生成错误。完全限定的名称必须少于260个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建WPF解决方案时遇到了麻烦。每次尝试构建它时,都会收到以下错误消息:

I'm having trouble while building my WPF solution. Everytime I try to build it, I get this error message:


未知的构建错误,'指定的路径,文件名或两者都是太长了
。完全限定的文件名必须少于260个字符,
且目录名称必须少于248个字符。'

Unknown build error, '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.'

有人可以帮助我吗?我已经验证了所有字段,并且它们的扩展路径都可以。这可能是TortoiseSVN或类似问题吗?我最近在解决方案中添加了一个文件夹,可以解决这个问题吗?

Someone can help me? I've already verified all the fields and their extension paths are ok. Can this be a problem with the TortoiseSVN or something like this? I recently added a folder to my solution, can be something with this?

推荐答案

这是Windows中众所周知的限制Win32 API。您存储项目的目录嵌套太深。文件的完整路径名不能超过259个字符。除此之外,由于缓冲区溢出,许多使用MAX_PATH的C代码也开始失败。

This is a well-known restriction in the Windows win32 api. The directory in which you stored your project is nested too deep. The full path name of a file cannot contain more than 259 characters. Beyond this, lots of C code that uses MAX_PATH starts failing due to buffer overflows.

将您的解决方案移动到更靠近根目录的另一个目录。

Move your solution to another directory, one that's closer to the root.

这篇关于Visual Studio未知的生成错误。完全限定的名称必须少于260个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆