berqo127
Posts: 21
Joined: Tue Aug 06, 2019 1:35 pm

incorrect values in xml file

Hi,

I'm using web.config as xml file under Files and Folders. the file contains a list of assembly bindings and from some reason the old version and the new version attributes get a wrong value in some environments that I run the installer. worth to mention that I don't update the xml, I always create a new file.

an example of assemebly binding:

<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0"/>
</dependentAssembly>

attached is the aip file.

please advice.

Thanks,
Shlomi
Attachments
iGreen.aip
(992.84 KiB) Downloaded 327 times
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: incorrect values in xml file

Hi Shlomi,

This, most likely, happens because the "bindingRedirect" element has no identifier attribute. Please set the "Is identifier attribute" option for at least one attribute of each "bindingRedirect" elements and see if it works.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
berqo127
Posts: 21
Joined: Tue Aug 06, 2019 1:35 pm

Re: incorrect values in xml file

Thanks.
it indeed worked with assembly binding list but in the following xml config AI changed the order of the elements and put the clear tag after the connection string tag. I checked the is identifier attribute for all attributes of the connection string but it didnt change anything.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<connectionStrings>
<clear/>
<add name="iGreenConnectionString" connectionString="Data Source=;Initial Catalog=;User ID=sa;Password=;MultipleActiveResultSets=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: incorrect values in xml file

Hi Shlomi,

I'm glad the first problem is fixed. As for the order of the elements you detailed, they look correct to me. I see that there are more "ConnectionString.config" files in your project and all of them have the configuration below:

Code: Select all

<connectionStrings>
     <clear>
     <add>
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
berqo127
Posts: 21
Joined: Tue Aug 06, 2019 1:35 pm

Re: incorrect values in xml file

correct but sometime after the installation the order is mixed and clear appears last and unfortunately the order matter and it fails our app.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: incorrect values in xml file

Hi,

I tested the scenario, but the elements were always added in the correct order for me. Can you isolate the behavior in a test case scenario or pattern and forward it to me?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”