Groups | Blog | Home
all groups > dotnet interop > november 2005 >

dotnet interop : app.config with .Net written COM


Baron Ng
11/3/2005 5:38:02 PM
Hi,
I wrote a COM (ABC.dll) using VS.Net 2005
since it is not an application; I don't know how it can access app.config
(ABC.dll.config)

I tried ConfigurationManager.AppSettings but it didn't work

any idea?!

Jason Newell
11/4/2005 8:11:05 AM
Baron,

App.Config is only for executables. If you want to use something like
an App.Config for a .dll, you'd have to write your own AppSettings class
to manage it.

To quote
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriintroductiontoapplicationsettingstorage.asp

"You can use dynamic properties in any application that compiles to an
..exe file. Projects that compile a DLL cannot use dynamic properties
directly..."

Jason

[quoted text, click to view]
Baron Ng
11/7/2005 12:48:32 AM
Thanks!
Guess i need to make use of registry

[quoted text, click to view]
AddThis Social Bookmark Button