我正在尝试按照Microsoft 文档来解除MAX_PATH
Windows 10 下 API 中的文件路径限制。它说:
您还可以通过清单为每个应用启用新的长路径行为:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>true</ws2:longPathAware>
</windowsSettings>
</application>
那么,第一个问题。是否可以在 Visual Studio 2017 的项目属性中启用它?
第二个问题:我没有在上面找到答案,所以我决定走手动路线:
我这样创建了
additional.manifest
文本文件:<?xml version="1.0" encoding="utf-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" > <application xmlns="urn:schemas-microsoft-com:asm.v3"> <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings"> <ws2:longPathAware>true</ws2:longPathAware> </windowsSettings> </application> </assembly>
然后我将它添加到项目属性中:
- 但是当我编译它时,它给了我这个警告,并且当应用程序运行时,清单似乎没有效果:
1>additional.manifest:清单创作警告 81010002:命名空间“ http://schemas.microsoft.com/SMI/2016/WindowsSettings ”中无法识别的元素“longPathAware ”。
那么我做错了什么?