[wix-users] Error in Light

Edwin Castro egcastr at gmail.com
Wed Apr 26 10:22:36 PDT 2017


The format suggested, [#$(var.ExeName).config], depends on the
File/@Id for the specific file you are trying to change. I see the
component for $(var.ExeName).config has an Id but the File element
does not. That means the File Id is generated and you don't know it
ahead of time. I'd recommend you explicitly set File/@Id and then use
that Id in XmlConfig/@File. Some thing like this:

      <Component Id="cmpAppConfig"
Guid="7C93264D-6DBA-4614-9693-5AC244F30986" KeyPath="yes">
        <File Id="fileAppConfig" Source
="$(var.SourceFilesDir)\$(var.ExeName).config">
          <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]"
GenericAll="yes"/>
        </File>
      </Component>

And then you can set XmlConfig/@File="[#fileAppConfig]".

To use XmlConfig/@File="[#$(var.ExeName).config]" as originally
suggested you would need:

      <Component Id="cmpAppConfig"
Guid="7C93264D-6DBA-4614-9693-5AC244F30986" KeyPath="yes">
        <File Id="$(var.ExeName).config" Source
="$(var.SourceFilesDir)\$(var.ExeName).config">
          <util:PermissionEx User="Users" Domain="[LOCAL_MACHINE_NAME]"
GenericAll="yes"/>
        </File>
      </Component>

--
Edwin G. Castro


On Wed, Apr 26, 2017 at 9:47 AM, Habib Salim <habib at hsalim.com> wrote:
> Thanks for the fast response!
> I tried both
>                         File="[#$(var.ExeName).config]"
>                         File="[INSTALLFOLDER]$(var.ExeName).config"
> I still get the error
>
>
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Nir Bar
> Sent: Wednesday, April 26, 2017 12:35 PM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] Error in Light
>
> The XmlConfig/@File attribute should be the path to the file on the target
> system, not on the build machine.Change it to [#$(var.ExeName).config] and
> it should work.
>
> Nir Bar
> Panel::Software Architecture and Development
>
> ______________________________________________________________
> JetBA.net- Native and WPF WiX BootstrapperApplication Frameworks
>
>
>
>
>
>
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list