app.config ??

  • Thread starter Thread starter Phil Hunt
  • Start date Start date
P

Phil Hunt

Kind of new here.
I have a class libary which contains a app.config. I also have a window
application will invoke the class library.When the app call the library, the
class does not seem to find the property in the app.config. What is the
proper way to handle this ?

Thanks
 
I have a class libary which contains a app.config. I also have a window
application will invoke the class library.When the app call the library,
the class does not seem to find the property in the app.config. What is
the proper way to handle this ?

Your description is a bit vague, but I'll take a guess.

Let's say your library is called "Company.Function.dll". Check the bin
folder of your application (or bin\Debug / bin\Release) to be sure that you
ALSO have "Company.Function.dll.config". If you do and the library is still
unable to see values in the config file then we'll have to dig deeper.
 
Thanks. I did a little research on the web after posting. This is a common
question where do one have a easy answer.
As soon as i copy the app.config from the dll assembly to the main
application, everything works fine. It kind of defeat the purpose of
decoupling the component. Well ...
 
Just curious. Is 'test harness' a VS fancy scenireo with extra codes to
handle this situation ?
 
Back
Top