System.Configuration.ConfigurationManager problems, like it doesn't

Hi,

I have a Visual studio 2005 project that runs as a Windows Service. In
it I have declared that I am using System.Configuration.

I have set one application setting for the service using the settings
panel.

When I try to do the following;

ConfigurationManager.AppSettings[name of the setting being used];

I get the error warning that Error 2 The name 'ConfigurationManager'
does not exist in the current context

If I try the
System.Configuration.ConfigurationManager.AppSettings it tells me that
ConfigurationManager is not part of System.Configuration.

If I try to use ConfigurationSettings of course it tells me that it is
obsolete, which is undoubtedly a bad thing but I really like the thing
that it works as opposed to the correct ConfigurationManager which
doesn't.
bryan rasmussen [ So, 06 Januar 2008 23:54 ] [ ID #1900723 ]

Re: System.Configuration.ConfigurationManager problems, like it doesn't exist.

"pantagruel" <rasmussen.bryan [at] gmail.com> wrote in message
news:64d7fcec-2014-4452-83b5-f34b5e417c6a [at] x69g2000hsx.google groups.com...
> Hi,
>
> I have a Visual studio 2005 project that runs as a Windows Service. In
> it I have declared that I am using System.Configuration.
>
> I have set one application setting for the service using the settings
> panel.
>
> When I try to do the following;
>
> ConfigurationManager.AppSettings[name of the setting being used];
>
> I get the error warning that Error 2 The name 'ConfigurationManager'
> does not exist in the current context
>
> If I try the
> System.Configuration.ConfigurationManager.AppSettings it tells me that
> ConfigurationManager is not part of System.Configuration.
>
> If I try to use ConfigurationSettings of course it tells me that it is
> obsolete, which is undoubtedly a bad thing but I really like the thing
> that it works as opposed to the correct ConfigurationManager which
> doesn't.
>

Go to Reference for the project, the .Net tab, remove the reference for
System.Configuration, and then add the reference back. You can see if that
corrects your problem.
MR. Arnold [ Mo, 07 Januar 2008 05:01 ] [ ID #1901457 ]

Re: System.Configuration.ConfigurationManager problems, like it

On Jan 7, 5:01 am, "Mr. Arnold" <MR. Arn... [at] Arnold.com> wrote:
> "pantagruel" <rasmussen.br... [at] gmail.com> wrote in message
>
> news:64d7fcec-2014-4452-83b5-f34b5e417c6a [at] x69g2000hsx.google groups.com...
>
>
>
> > Hi,
>
> > I have a Visual studio 2005 project that runs as a Windows Service. In
> > it I have declared that I am using System.Configuration.
>
> > I have set one application setting for the service using the settings
> > panel.
>
> > When I try to do the following;
>
> > ConfigurationManager.AppSettings[name of the setting being used];
>
> > I get the error warning that Error 2 The name 'ConfigurationManager'
> > does not exist in the current context
>
> > If I try the
> > System.Configuration.ConfigurationManager.AppSettings it tells me that
> > ConfigurationManager is not part of System.Configuration.
>
> > If I try to use ConfigurationSettings of course it tells me that it is
> > obsolete, which is undoubtedly a bad thing but I really like the thing
> > that it works as opposed to the correct ConfigurationManager which
> > doesn't.
>
> Go to Reference for the project, the .Net tab, remove the reference for
> System.Configuration, and then add the reference back. You can see if that
> corrects your problem.

Thanks!
bryan rasmussen [ Mo, 07 Januar 2008 09:25 ] [ ID #1901468 ]
Microsoft » microsoft.public.dotnet.general » System.Configuration.ConfigurationManager problems, like it doesn't

Vorheriges Thema: State Machine Workflow - Delay Activity firing multiple times
Nächstes Thema: "Automatic" document production