无法向文件 "obj\Debug\net5.0\SolutionName.GeneratedMSBuildEditorConfig.editorconfig "写行,超过了操作系统最大路径限制。[英] Could not write lines to file "obj\Debug\net5.0\SolutionName.GeneratedMSBuildEditorConfig.editorconfig exceeds the OS max path limit

本文是小编为大家收集整理的关于无法向文件 "obj\Debug\net5.0\SolutionName.GeneratedMSBuildEditorConfig.editorconfig "写行,超过了操作系统最大路径限制。的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我正在进行一个项目,我运行了1次,而且很好,我第二次运行,并且出现此错误"无法写入file" obj \ debug \ debug \ net5.0 \ solutionname.generatemsbuildedoritorconfig. EditorConfig超过OS最大路径限制.完全合格的文件名必须小于260个字符. SolutionName C:\ Program Files(X86)\ Microsoft Visual Studio \ 2019 \ Professional \ MSBUILD \ MSBUILD \ Current \ bin \ roslyn \ Microsoft.managed.core.core.core.targets 150".

所以我做了一些研究,最常见的响应是重新安装Visual Studio,所以我做到了,但是错误仍在继续.因此,我创建了一个新程序,并且在新程序中不进行任何更改的情况下,相同的erros ocurred.我在这个新程序中唯一拥有的是带有" Hello World"的主要课程.

我认为它不是代码问题,我找不到任何回答为什么出现此错误的东西.

推荐答案

我也经历了类似的问题.我通过将项目移至C的根源来解决它:驱动器尝试缩短项目的名称和路径.

其他推荐答案

我有相同的错误,这与"文件名"必须小于260个字符" 并通过启用Windows Long Path 解决 通过参考链接: 文档/filr/filr-4/filr-desktop/t47bx2ogpfz7.html

或执行以下步骤:

1- 单击窗口键,然后键入gpedit.msc,然后按Enter键.这启动了本地组策略编辑.

2 - 导航到本地计算机策略>计算机配置>管理模板>系统>文件系统.

3 - 双击启用ntfs长路径.

喜欢此图像

4- 选择已启用,然后单击"确定".

5- 终于重新启动Visual Studio

其他推荐答案

我也经历了类似的问题.我通过将项目移至C的根源来解决它:驱动器尝试缩短项目的名称和路径.

本文地址:https://www.itbaoku.cn/post/2338783.html

问题描述

I was doing a project, I runned 1 time and it was fine, I runned the second time and this error appeard "Could not write lines to file "obj\Debug\net5.0\SolutionName.GeneratedMSBuildEditorConfig.editorconfig exceeds the OS max path limit. The fully qualified file name must be less than 260 characteres. SolutionName C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Roslyn\Microsoft.Managed.Core.targets 150".

So I did a little research and the most common response was to re-install visual studio, so i did, but the error continued. So i create a new program and without doing any changes, in the new program, the same erros ocurred. The only thing i have in this new program is the main class with an "Hello world".

I assume its not a code problem and i can't find anything that answers why this error is appearing.

推荐答案

I have also experienced a similar issue. I resolved it by moving my project to the root of my C: Drive to try and shorten the name and the path of the project.

其他推荐答案

I have same error, and that is related with 'file name must be less than 260 characters' and resolved by Enabling Windows Long Path via reference link: https://www.microfocus.com/documentation/filr/filr-4/filr-desktop/t47bx2ogpfz7.html

or do the following steps:

1- Click Window key and type gpedit.msc, then press the Enter key. This launches the Local Group Policy Editor.

2- Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem.

3- Double click Enable NTFS long paths.

like this image

4- Select Enabled, then click OK.

5- at last restart visual studio

其他推荐答案

I have also experienced a similar issue. I resolved it by moving my project to the root of my C: Drive to try and shorten the name and the path of the project.