Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Application Config file not available for Class library in vs2008?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stimp - 05 Feb 2008 23:33 GMT
Hi all,

I've created a web application (not website) in VS2008 and have added a
class library project to the same solution.

I want to add an app.config to the class library but "Application
Configuration File" doesn't appear to be an option (as it was in VS2005)

Any ideas what could be going wrong here?

Cheers.  

Signature

fiddlewidawiddum

Peter Bromberg [C# MVP] - 06 Feb 2008 01:04 GMT
Class libraries do not automatically load an "app.config" file as do
executable (exe) processes. You can have your class library acess the
elements in the web.config as long as you have set a reference to the
System.Configuration namespace in your library assembly.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com 

> Hi all,
>
[quoted text clipped - 7 lines]
>
> Cheers.  
Stimp - 06 Feb 2008 09:50 GMT
> Class libraries do not automatically load an "app.config" file as do
> executable (exe) processes. You can have your class library acess the
> elements in the web.config as long as you have set a reference to the
> System.Configuration namespace in your library assembly.

this is actually for the sake of setting up SubSonic DAL generator in
the class library, I believe it requires a local app.config
(as shown in: http://www.wekeroad.com/ss_setup2.html)

I ended up just manually adding the app.config as a text file and it
seems to have worked

Cheers.
Signature


fiddlewidawiddum


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.