Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: app.config problem

Geek News

app.config problem
Tinchonny 6/26/2007 10:12:01 PM
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
Re: app.config problem
"SvenC" <SvenC[ at ]community.nospam> 6/27/2007 7:50:53 AM
Hi,

[Quoted Text]
> 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

--
SvenC

Re: app.config problem
Tinchonny 6/28/2007 7:50:02 PM


"SvenC" wrote:

[Quoted Text]
> 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
>
> --
> 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

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net