You cannot use
App.Config
in Class-Library Project. Class-Library Project can refer to
App.Config
/
Web.Config
file of the Project(Windows/Web etc.) in which it is added as a reference.
You may keep that
key
of
appSettings
in the
App.Config
/
Web.Config
file of your Final/Output(Windows/Web etc.) Project, and then access it.
Updated -
Below link has a discussion on this topic, which certainly does not provide any concrete solution other than referencing App.Config/Web.config settings of the Project in which Class-Library project has been referenced.
http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/bbfb03bc-9b1d-4cc7-8fff-c484bb1b93f3
Edit - Have a look at one more discussion thread on this topic. [Spelling corrections.]
http://stackoverflow.com/questions/435261/asp-net-solution-with-class-library-project