Results 1 to 4 of 4

Thread: VB .net App.Config file in the project

  1. #1
    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?

  2. #2
    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.

  3. #3
    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.

  4. #4
    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;

Similar Threads

  1. How to convert a Project 95 file to Project 2007
    By VauGhna in forum Microsoft Project
    Replies: 9
    Last Post: 02-05-2012, 08:25 PM
  2. Replies: 8
    Last Post: 18-04-2011, 08:09 AM
  3. How to open a MS project 2007 file in MS project 2010
    By pqmot in forum Windows Software
    Replies: 3
    Last Post: 30-12-2010, 04:41 PM
  4. Replies: 3
    Last Post: 10-11-2010, 07:27 PM
  5. Difference between Web.Config and Machine.Config File
    By Adrina_g in forum Software Development
    Replies: 5
    Last Post: 23-01-2010, 02:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,035,009.79539 seconds with 17 queries