问题
I use this code:
'<'Directory Id="x" Name="ext">
<'Component Id="y" Guid="4480e442-42d9-41a8-a091-9bdbf5aa47df">
<'CreateFolder Directory="ext" />
<'/Component>
'<'/Directory>
But it failed with the following error:
: error LGHT0094 : Unresolved reference to symbol 'Directory:ext' in section 'Product:*'.what could be the problem? BTW: I have difficulties pasting the XML code in this form.
回答1:
This should be Directory Id, not the name:
<CreateFolder Directory="x" />
Or just
<CreateFolder/>
to create the containing directory if you are not going to write any file there.
来源:https://stackoverflow.com/questions/38214039/how-to-create-folder-in-wix