ConfigurationManager question

C

CSharper

I have a solution where I need to read a section from my app.config. I
added system.configuration to my reference and I added using
System.Configuration to my code

but when I try to do

System.Configuration secConfiguration = System.Configuration. to get
ConfigurationManager, the ConfigurationManager doesn't show up.

Does anyone know why the ConfigurationManager doesn't show up? I am
using VS2008 3.5 framework.
Thanks,
 
C

CSharper

[...]
System.Configuration secConfiguration = System.Configuration. to get
ConfigurationManager, the ConfigurationManager doesn't show up.
Does anyone know why the ConfigurationManager doesn't show up? I am
using VS2008 3.5 framework.

Hard to say for sure.  But, have you added System.Configuration.dll as a  
reference to your project?  Do you get any other compilation errors (e.g.  
press F6 and see what the compiler tells you).

It is interesting, I removed all the code and added a new method and
started
System.Configuration. to see if the intellisense will give
Configuration but it didn't instead the closest one is
ConfigurationSettings and it seems it is decrepted. When I looked the
system.configuration it is version 2.0 not 3.5 does it matter? Sorry I
know it has not much information.

To make things more interesting, I created a new project added
Configuration and there I am able to get ConfigurationManager without
any problem.
 
C

CSharper

[...]
System.Configuration secConfiguration = System.Configuration. to get
ConfigurationManager, the ConfigurationManager doesn't show up.
Does anyone know why the ConfigurationManager doesn't show up? I am
using VS2008 3.5 framework.

Hard to say for sure.  But, have you added System.Configuration.dll as a  
reference to your project?  Do you get any other compilation errors (e.g.  
press F6 and see what the compiler tells you).

It is interesting, I removed all the code and added a new method and
started
System.Configuration. to see if the intellisense will give
Configuration but it didn't instead the closest one is
ConfigurationSettings and it seems it is decrepted. When I looked the
system.configuration it is version 2.0 not 3.5 does it matter? Sorry I
know it has not much information.

To make things more interesting, I created a new project added
Configuration and there I am able to get ConfigurationManager without
any problem.
 
C

CSharper

[...]
System.Configuration secConfiguration = System.Configuration. to get
ConfigurationManager, the ConfigurationManager doesn't show up.
Does anyone know why the ConfigurationManager doesn't show up? I am
using VS2008 3.5 framework.
Hard to say for sure.  But, have you added System.Configuration.dll as a  
reference to your project?  Do you get any other compilation errors (e.g.  
press F6 and see what the compiler tells you).

It is interesting, I removed all the code and added a new method and
started
System.Configuration. to see if the intellisense will give
Configuration but it didn't instead the closest one is
ConfigurationSettings and it seems it is decrepted. When I looked the
system.configuration it is version 2.0 not 3.5 does it matter? Sorry I
know it has not much information.

To make things more interesting, I created a new project added
Configuration and there I am able to get ConfigurationManager without
any problem.

Sorry, found the problem, I was adding the dll reference to a wrong
project then the code where I needed to add. Thank you very much for
the time.
 
C

CSharper

[...]
System.Configuration secConfiguration = System.Configuration. to get
ConfigurationManager, the ConfigurationManager doesn't show up.
Does anyone know why the ConfigurationManager doesn't show up? I am
using VS2008 3.5 framework.
Hard to say for sure.  But, have you added System.Configuration.dll as a  
reference to your project?  Do you get any other compilation errors (e.g.  
press F6 and see what the compiler tells you).

It is interesting, I removed all the code and added a new method and
started
System.Configuration. to see if the intellisense will give
Configuration but it didn't instead the closest one is
ConfigurationSettings and it seems it is decrepted. When I looked the
system.configuration it is version 2.0 not 3.5 does it matter? Sorry I
know it has not much information.

To make things more interesting, I created a new project added
Configuration and there I am able to get ConfigurationManager without
any problem.

Sorry, found the problem, I was adding the dll reference to a wrong
project then the code where I needed to add. Thank you very much for
the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top