In my WPF application (Composite Application) I want to store a variable in the App.config file, but as soon as I add an appSettings section in App.config, it gives me this error:
The type initializer for System.Windows.Application threw an exception.
App.Config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SmartFormMockDirectory" value="C:\test"/>
</appSettings>
<configSections>
</configSections>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Service1Soap" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTime...
In general I know this works since I can get it to work in simple applications like this.
What could be causing the above error and how would I fix it so I can simply add variables to the App.config file?