【发布时间】:2017-07-24 10:57:18
【问题描述】:
有没有人在 .NET Core 1.1 中看到过问题,在 netcoreapp1.1\publish 文件夹下,他们最终会得到一个 bin 文件夹,该文件夹似乎会自行循环,并最终导致路径过长的消息出现在 Windows 中。尝试在 Windows 资源管理器中删除此文件夹会导致出现 Source Too Long 消息。唯一的解决方案是使用RoboCopy。
以下是其中一个生成路径的示例:
bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1 \publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1 \publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1\publish\bin\Debug\netcoreapp1.1 \publish\bin\release\netcoreapp1.1\publish\bin\release\netcoreapp1.1\publish\bin\release\netcoreapp1.1\publish\bin\release\netcoreapp1.1\publish\bin\release\netcoreapp1.1 \发布\控制器\
这是因为我设置不正确造成的问题吗?
最后一次清理返回以下统计信息:
文件夹:6866 文件:7391
我正在使用以下命令发布:
dotnet publish -c debug
似乎每次发布都会使文件夹结构更深,这似乎与我的项目中创建此文件夹结构的 CSHTML 文件有关:
\publish\bin\debug\netcoreapp1.1\publish\Controllers\Account\Views
然后在第二次构建这个结构:
\publish\bin\debug\netcoreapp1.1\publish\bin\debug\netcoreapp1.1\publish\Controllers\Account\Views
等等……
我正在使用 SDK 1.0.0-preview2-1-003177
【问题讨论】:
-
如果我没看错,磁盘上确实存在嵌套的文件夹结构吗?
-
另外,我认为您无法使用 Windows 资源管理器删除该文件夹,因为该程序在许多方面都受限于 MAX_PATH 定义 (260)。您可以编写一个程序来为您删除文件夹。编辑:我想 Robocopy 也可以。真正的问题是路径大于 MAX_PATH
-
你是如何发布它的?
-
你用的是什么sdk版本?
-
@marc 我已将此添加到问题中。
标签: c# asp.net-core-1.1