I have just managed to persuade our company to invest in the Professional edition of Visual Studio 2005, to replace our existing installation of VS2002.

I'm having a number of conversion issues, which are leaving me a bit confused. All of my applications are windows-based, are built using VB2002, and are built to read default settings from an XML configuration file.

In the old days, I would "IMPORT" the System.Configuration library. From there, I would reference the appropriate config file setting using the following syntax:

<variablename> = ConfigurationSettings.AppSettings("<SettingName>")

However, when I try to compile an application that I've just converted from VS2002 to VS2005, I get the following error:

'Public Shared Function GetConfig(sectionName As String) As Object' is obsolete: 'This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection'

However, when I try to alter the code, it throws up syntax errors. Can someone tell me what the correct code should be for this?