我正在尝试发布一个ASP。NET Core web应用程序与Angular前端连接到我的虚拟主机帐户。该项目使用SSR,这会导致生成的文件的路径长度超过260个字符。
通常我会将解决方案文件夹直接放在我的
C:\
驱动器,以防止路径长度超过260个字符,这工作得很好。
昨天我购买了Windows 10 Pro,并做了以下事情:
-
gpedit.msc计算机配置管理模板系统文件系统启用Win32长路径=已启用
-
注册表查找
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
已设置为
1
-
重新启动计算机
现在我正试图发布我的ASP。NET Core和Angular应用程序与Visual Studio(管理员)通过
部署工具
,但我还是得到了
PathTooLongException
为什么这种情况还在发生?
编辑:
我尝试将清单文件添加到我的项目中
as stated here
,但它仍然不起作用:(我项目中的longpaths.manifest)
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
</assembly>