All,
I've trawled the net for an answer to this particular query and have so
far come up blank.
The situation is that I have a business object component (call it
Business.dll) which I want to use as part of a number of applications,
developed using VS2005. For the moment, I want to deploy it as part of
client applications which will also be developed with VS2005. However,
I also want to be able to control the configuration of the DLL
independently of the configuration of the EXE.
Within the Business solution file, I have an app.config file which is
created as a result of adding project settings. When I compile
Business.dll, Business.dll.config duly appears in the bin folder of the
Business project. When I include the project into a client application
solution (I reference the source code rather than a reference to a DLL)
and compile the client application, the Business.dll.config file is not
copied across.
Within the Business.dll.config, all references to application settings
are handled using the My.Settings namespace. However, it appears that
when the DLL is compiled within a composite application, the default
settings from the project Settings.settings file are used, whether or
not the Business.dll.config file is present. This is obviously not the
behaviour that was required or expected.
Am I doing something fundamentally wrong, for example do I need to
access the app.config files using the configuration manager to access
the business.dll.config file explicitly?
Any help or pointers in the right direction gratefully received.
Thanks,
Brian
Michel de Becdelièvre - 26 Nov 2006 11:25 GMT
> All,
>
> I've trawled the net for an answer to this particular query and have so
> far come up blank.
...
> Within the Business.dll.config, all references to application settings
> are handled using the My.Settings namespace. However, it appears that
[quoted text clipped - 11 lines]
> Thanks,
> Brian
The way I'm handling this kind of trouble is by including external config
files in App.config / Web.config :
for instance :
<connectionStrings configSource="Base.config">
</connectionStrings>
<appSettings file="Commun.config">
</appSettings>
I believe this comes with a price : automatic detection of file change is
disabled.