Satellite assemblies modifying Program Configuration settings

  • Thread starter Thread starter Roger Webb
  • Start date Start date
R

Roger Webb

Hey.

Is there a way to attach a satellite assembly to a specific programs'
App.Config File? I have some assembly functions that get used in multiple
programs... each configured in its own way. If I pass them in as
parameters, then I cant update them. Anyone have an idea??

- Roger
 
Roger,

Your assemblies should be using the configuration file for the
executable that launched the runtime. You can get this through the
ConfigurationSettings class in the System.Configuration namespace.

What do you mean by passing them in as parameters? The assemblies
should look for their configuration in the main config file. If you have a
need for something outside of this behavior, then you will have to create
your own scheme (an XML file in a known location, for example).

Hope this helps.
 
Nicholas,

Thanks... I dunno what I did wrong when I tried that earlier, however, it
worked that time.

- Roger

Nicholas Paldino said:
Roger,

Your assemblies should be using the configuration file for the
executable that launched the runtime. You can get this through the
ConfigurationSettings class in the System.Configuration namespace.

What do you mean by passing them in as parameters? The assemblies
should look for their configuration in the main config file. If you have a
need for something outside of this behavior, then you will have to create
your own scheme (an XML file in a known location, for example).

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Roger Webb said:
Hey.

Is there a way to attach a satellite assembly to a specific programs'
App.Config File? I have some assembly functions that get used in multiple
programs... each configured in its own way. If I pass them in as
parameters, then I cant update them. Anyone have an idea??

- Roger
 
Back
Top