Home All Groups Group Topic Archive Search About

2003 to 2005 conversion problem

Author
5 May 2006 2:02 PM
Bob
In VB.NEt 2003 I had a line
Dim strTemp As String = ConfigurationSettings.AppSettings.Get(key)

Converyting to 2005 Gives a warning that this is obsolete. they say its been
replaced with

System.configuration.configurationManager.appsetings but writing that in
does not work Configuration manager is not in the intellicode of
system.configuration so you get anopther err msge <GG>

Can anyone help me with this I'm new to 2005. Where can I get the sample
code to get an appsetting correctly from the config file using 2005?

Thanks for any help

Bob

Author
5 May 2006 2:48 PM
Claes Bergefall
CollectionManager is in the same namespace but in a different assembly so
you need to add a reference to System.Configuration in your project.

   /claes

Show quoteHide quote
"Bob" <bduf***@sgiims.com> wrote in message
news:uau2CyEcGHA.3952@TK2MSFTNGP04.phx.gbl...
> In VB.NEt 2003 I had a line
> Dim strTemp As String = ConfigurationSettings.AppSettings.Get(key)
>
> Converyting to 2005 Gives a warning that this is obsolete. they say its
> been replaced with
>
> System.configuration.configurationManager.appsetings but writing that in
> does not work Configuration manager is not in the intellicode of
> system.configuration so you get anopther err msge <GG>
>
> Can anyone help me with this I'm new to 2005. Where can I get the sample
> code to get an appsetting correctly from the config file using 2005?
>
> Thanks for any help
>
> Bob
>
>
>
>
>
>
>
>
Author
6 May 2006 10:26 AM
Bob
Thanks Claes
Show quoteHide quote
"Claes Bergefall" <louplou@nospam.nospam> wrote in message
news:%23QTcaKFcGHA.3712@TK2MSFTNGP03.phx.gbl...
> CollectionManager is in the same namespace but in a different assembly so
> you need to add a reference to System.Configuration in your project.
>
>   /claes
>
> "Bob" <bduf***@sgiims.com> wrote in message
> news:uau2CyEcGHA.3952@TK2MSFTNGP04.phx.gbl...
>> In VB.NEt 2003 I had a line
>> Dim strTemp As String = ConfigurationSettings.AppSettings.Get(key)
>>
>> Converyting to 2005 Gives a warning that this is obsolete. they say its
>> been replaced with
>>
>> System.configuration.configurationManager.appsetings but writing that in
>> does not work Configuration manager is not in the intellicode of
>> system.configuration so you get anopther err msge <GG>
>>
>> Can anyone help me with this I'm new to 2005. Where can I get the sample
>> code to get an appsetting correctly from the config file using 2005?
>>
>> Thanks for any help
>>
>> Bob
>>
>>
>>
>>
>>
>>
>>
>>
>
>