[wix-users] Independent Directory element

Dzmitry Razhanski Dzmitry_Razhanski at epam.com
Wed Jan 17 03:45:08 PST 2018


I think only one root directory could be and all other directories must be defined under it. 
And it is a good practice to define all installation directories in one place. You could read about it in this example: 

But if you still want to define some directory in another fragment you could use DirectoryRef element:
<DirectoryRef Id="TARGETDIR">
      <Directory Id="TestDir" ... />

Best regards,
	Dzmitry Razhansky.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Ven H via wix-users
Sent: Tuesday, January 16, 2018 7:17 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Ven H <venh.123 at gmail.com>
Subject: [wix-users] Independent Directory element

Can't I define an independent Directory element inside a separate fragment or component? If I do that, I get an error saying "The directory with the Id 'TestDir' is not a valid root directory. There may only be a single root directory per product or module and it's Id attribute value must be TARGETDIR and it's Name attribute value must be SourceDir. " Sorry for asking such a silly question, but I am new to WiX, so, please forgive me. I am a newbie and a learner and could use all the help. Hence, please help.


WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

More information about the wix-users mailing list