I have looked at many other answers here on how to solve this and all point to malformed XML in the app.config file. However, my app.config seems to have the <configSections>
node in the correct place (first child node of <configuration>
):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings"
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="My_Excel_Addin_Name.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<My_Excel_Addin_Name.Properties.Settings>
<setting name="Host" serializeAs="String">
<value />
</setting>
<setting name="Port" serializeAs="String">
<value />
</setting>
</My_Excel_Addin_Name.Properties.Settings>
</userSettings>
</configuration>
Is it possible that it is something to do with the name of my project containing spaces ("My Excel Addin Name")?
I also thought it may have been something to do with refactoring namespace names in VS2010 so I rebuilt my project (Excel Add In) in a new project where no refactoring was done but the issue still remains.
I have left out some user settings above but have gone through them to check for duplicates and none exist.
This only happens when I deploy the add in with a windows installer. When I build in release and run on my machine without using the installer, the issue doesn't occur.
Any ideas?
Thanks
Any ideas what could be the issue here?