app.config ??

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
 
J

Jeff Johnson

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.
 
P

Phil Hunt

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 ...
 
P

Phil Hunt

Just curious. Is 'test harness' a VS fancy scenireo with extra codes to
handle this situation ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top