[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Problem with Custom Configuration Sections (.net 2.0

mike.liddell

6/13/2006 5:35:00 AM

Hello,

How can I get at a custom config sections via installutil and an
Installer class?



Notes on my current situation:
when the application runs via app.exe, I use
ConfigurationSection mySection =
ConfigurationManager.GetSection("MyConfigurationGroup/MyConfigurationSection");

however, from an Installer class this is not so easy. For a start, the
exe that is being run in installutil.exe, so the default config file is
installutil.exe.config rather than for my app.

So I tried
Configuration config =
ConfigurationManager.OpenExeConfiguration("myapp.exe");
ConfigurationSection mySection =
config.GetSection("MyConfigurationGroup/MyConfigurationSection");

but this throws a type load error (can't load the assembly containing
the custom section definition). and the weird thing is that the
required library is already loaded (its signature was written to the
Debug console by the loader)

any help appreciated