[RESOLVED] (2003) App.Config Driving me mad....
This should be easy but it's driving me nuts, I can't read from the app.config file. I've created a very basic test project and I keep getting the error Required parameter 'Value' not found.
It's there I can see it ! In the app.config file, someone put me out of my misery :)
My app.config
vb Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Test" Value="Hello" />
</appSettings>
</configuration>
My little program to read it.
vb Code:
Dim ConfigReader As ConfigurationSettings
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Label1.Text = ConfigReader.AppSettings.Get("Test")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Re: (2003) App.Config Driving me mad....
In the config file, try spelling Value with a lower-case 'v'. :)
i.e.
Code:
<add key="Test" value="Hello" />
Re: (2003) App.Config Driving me mad....
Excellent, I couldn't see and it was staring me in the face !
Cheers Andy :)