By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,758 Members | 1,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,758 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.AppSetti ngs 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.

Jan 6 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"pantagruel" <ra*************@gmail.comwrote in message
news:64**********************************@x69g2000 hsx.googlegroups.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.AppSetti ngs 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.

Jan 7 '08 #2

P: n/a
On Jan 7, 5:01 am, "Mr. Arnold" <MR. Arn...@Arnold.comwrote:
"pantagruel" <rasmussen.br...@gmail.comwrote in message

news:64**********************************@x69g2000 hsx.googlegroups.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.AppSetti ngs 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!
Jan 7 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.