I am trying to retrieve a value saved in project A settings from project B in same solution set. Is this possible in VB.NET? If possible what namespace and function would I use?
Can anyone tell me if this is possible?
The answer is yes, you can. But ...
If you deploy it with your solution, the app.config file contains the initial settings for the application. This file has an XML format so can easely be retrieved.
The problem appears when the application A changes the settings at run time. Normally, the settings have a user scope and are stored in a user.config file in the application data (Local and/or Roaming) of the user (IE: "C:\Users\YourUserName\AppData\Local\SoftwareManufacturer\ProgramName.exe_Url_1tqa5xx0r3nrxtninucg0vbmopokfgt1\AssemblyVersion\user.config" )
You must know exacly the path to access it, and usually, this is created at the very first change of settings of the application.
In resume, you must know the right place to read the setting of the application A from the application B, and must have almost read permissions to all the path where the files are located.
To read an xml file is enough to use the system.io.streamreader. You can also import it in a dataset using the system.data.dataset.readxml() method.
Hope this helps
Wow, so does this mean i need to configure my application differently for all of the users since they all are going to have different directory path to the configuration file?