Adding a App.config to a Addin Project

hi,

How to access the contents of App.config file in a addin project after adding the key value pair?
These statements are not working Properly.

System.Configuration.ConfigurationSettings.AppSettings[keyname]

System.Configuration.ConfigurationSettings.AppSettings.GetValues(keyname);


This is working fine for other projects such as WindowsApplication and WebApplication and throwing error only in Addin Project.
Thanks in Advance,

Aravind

[515 byte] By [Jangu] at [2007-12-16]
# 1
Hi Aravind,

Application configuration files are associated with the .exe that starts the app, and cannot be associated with .dlls. In order for your .dll to read data out of a configuration file, you'll have to have it added to the MainApplication.exe.config file. At that point, you can read it using the standard APIs you mention above.

-Shawn

ShawnFarkas-MS at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified