app.config problem

G

Guest

i have an Add-in on Visual studio 2003, i added an app.config file and i add
this code:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="NAME" value="MONITOR.TXT"/>
</appSettings>
</configuration>

in the code of the Connect.cs file i try to read thi value
string name = ConfigurationSettings.AppSettings.Get("NAME");

the result is allways an empty string, how can i read this value
 
S

SvenC

Hi,
i have an Add-in on Visual studio 2003, i added an app.config file
and i add this code:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="NAME" value="MONITOR.TXT"/>
</appSettings>
</configuration>

in the code of the Connect.cs file i try to read thi value
string name = ConfigurationSettings.AppSettings.Get("NAME");

the result is allways an empty string, how can i read this value

Was the app.config copied to the executables directory and named
yourAppName.exe.config
 
G

Guest

SvenC said:
Hi,


Was the app.config copied to the executables directory and named
yourAppName.exe.config

--
SvenC

the outlook add-in don't have executables files (.exe), only dll, and for that reason i can't do it
Do you have anoter tip
 

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