Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 06-02-2009
Member
 
Join Date: Jan 2009
Posts: 22
VB .net App.Config file in the project

Hello,
According to my understandings
I can only have 1 app.config file in my windows application.
Now I have ApplicationSettings in one of my Dll projects.
<applicationSettings>
<ABCdll.Properties.Settings>
<setting name="ABCConnectionString" serializeAs="String">
<value>ABCConnectionString</value>
</setting>
</ABCdll.Properties.Settings>
</applicationSettings>
When i deploy the application will it automatically copy this from my dll project app.config to main projects app.config?
Reply With Quote
  #2  
Old 06-02-2009
Member
 
Join Date: May 2008
Posts: 115
Re: VB .net App.Config file in the project

I don't think you should have any problem with this. EnterpriseLibrary will compile entire project without any problem only it will make it hidden which you can make visible manually.
Hope this helps.
Reply With Quote
  #3  
Old 06-02-2009
Member
 
Join Date: Jan 2009
Posts: 22
Re: VB .net App.Config file in the project

Thanks for the reply.
But I can not make any changes in feature regarding the applicationSettings values.
I know that the configuration manager does not have the "ApplicationSettings" property.
eg.
string str = (string)Properties.Settings.Default["aaa"];
I can use tis to access the <applicationSettings> in it's own app.config file.
Reply With Quote
  #4  
Old 06-02-2009
Member
 
Join Date: May 2008
Posts: 115
Re: VB .net App.Config file in the project

If you insist on using appSettings read the value using
OpenExeConfiguration/OpenMappedExeConfiguration

Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); AppSettingsSection section = config.AppSettings;
string str = section.Settings["MyKey"].Value;
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "VB .net App.Config file in the project"
Thread Thread Starter Forum Replies Last Post
How to convert a Project 95 file to Project 2007 VauGhna Microsoft Project 9 02-05-2012 08:25 PM
Config.xml not specified. Valid config.xml file must be authored when deploying '(null)' Error 25004 Jaiya Operating Systems 8 18-04-2011 08:09 AM
How to open a MS project 2007 file in MS project 2010 pqmot Windows Software 3 30-12-2010 04:41 PM
Error opening Project 2007 file after using project 2010 Jio Microsoft Project 3 10-11-2010 07:27 PM
Difference between Web.Config and Machine.Config File Adrina_g Software Development 5 23-01-2010 02:44 PM


All times are GMT +5.5. The time now is 10:59 AM.