我正在尝试保存文件:
Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog
{
FileName = "verylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexampleverylongexample.foo",
DefaultExt = ".foo",
Filter = "Foo Bar|*.foo"
};
在对话框中按保存后,我收到以下信息:
The filename, directory name, or volume label syntax is incorrect.
即使我有这个app.manifest
:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings xmlns:ws2="https://schemas.microsoft.com/SMI/2016/WindowsSettings">
<ws2:longPathAware>
true
</ws2:longPathAware>
</windowsSettings>