[wix-users] Error in Light

Habib Salim habib at hsalim.com
Wed Apr 26 11:54:33 PDT 2017


Aha!  That was it. Thank you!

I had this for element path
ElementPath="//configuration/connectionStrings/add[\[]@
name
='HSalimCo.WpfPivotViews.Properties.Settings.ConnectionString'[\]]/value"

when I changed it to 
ElementPath="//configuration/connectionStrings/add[\[]@name
='HSalimCo.WpfPivotViews.Properties.Settings.ConnectionString'[\]]/value"

It worked!  Thank you again.  It is such a relief to finally solve
something that's been bugging me for hours now.



-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
Of Edwin Castro
Sent: Wednesday, April 26, 2017 2:44 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Error in Light

Here is another example of the error:

http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/LGHT0136-err
or-importing-table-Upgrade-td7595107.html

Looking at the file that couldn't be imported,
C:\Users\HSalim.HSALIM\AppData\Local\Temp\z4rjkqxa\XmlConfig.idt in the
posted error, might help us figure out if there's a new line character or
tab somewhere. Note the .idt file to be imported is probably generated on
each build.

--
Edwin G. Castro


On Wed, Apr 26, 2017 at 11:41 AM, Edwin Castro <egcastr at gmail.com> wrote:
> Took a look at your actual error message:
>
> error LGHT0136: There was an error importing table 'XmlConfig' from 
> file 'C:\Users\HSalim.HSALIM\AppData\Local\Temp\z4rjkqxa\XmlConfig.idt'
>
> That error has nothing to do with the usage of [#fileid] which is the 
> correct way to reference the target file you want to modify. That was 
> a bug you had not experienced yet because you had not actually built 
> and tested your installer yet.
>
> As to your actual light error, something else is causing that error.
> I'm trying to understand when this error occurs. For example, I found 
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/error-LG
> HT0136-There-was-an-error-importing-table-td7582379.html
> where somebody had the same light error because they had unsupported 
> characters somewhere (new lines in that case). Perhaps you have a 
> similar issue but I don't know yet. I'll get back to you when I get 
> something more concrete to suggest.
>
> --
> Edwin G. Castro
>
> On Wed, Apr 26, 2017 at 11:13 AM, Habib Salim <habib at hsalim.com> wrote:
>> I commented out the component to modify the file 
>> (cmpModifyApplicationConfig).  The build completed successfully.
>>
>> When I examined the MSI in Orca, I noticed that the KeyPath was 
>> empty, and there was a CreateFolder table in the MSI - directory: 
>> INSTALLFOLDER, Component_:cmpAppConfig.
>>
>> I moved the KeyPath attribute from component to the file element.  
>> The component has a key path to the file, there is no create folder 
>> table in the MSI, but I still get the error.
>>
>>
>> -----Original Message-----
>> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
>> Behalf Of Edwin Castro
>> Sent: Wednesday, April 26, 2017 1:23 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Subject: Re: [wix-users] Error in Light
>>
>> 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/
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant 
>> http://www.firegiant.com/
>>
>> ____________________________________________________________________
>> 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