when does the assembly.exe.config file is created
-
i'm trying to understand the usage of settings.setting file, it says u can only change user scoped data at runtime and application scoped data cannot be changed at runtime, to modify the application scope data i have to use the assembly.exe.cofig file . but in my application it isn't there . how can i create it
-
i'm trying to understand the usage of settings.setting file, it says u can only change user scoped data at runtime and application scoped data cannot be changed at runtime, to modify the application scope data i have to use the assembly.exe.cofig file . but in my application it isn't there . how can i create it
-
i'm trying to understand the usage of settings.setting file, it says u can only change user scoped data at runtime and application scoped data cannot be changed at runtime, to modify the application scope data i have to use the assembly.exe.cofig file . but in my application it isn't there . how can i create it
Hi, You can right-click on your project (from the solution explorer) and choose Add-->New Item and select Application Configuration File from the dialog box that pops up and click OK. This will add an App.Config file to your project. This will be automatically renamed to Assembly.exe.config when you run your application. You can use the same XML data as given in the link to the post that d@nish had posted. Also, if you use
string test1 = System.Configuration.ConfigurationSettings.AppSettings["Key1"];
in your code, the VS compiler might throw a warning that this is deprecated. To get through that warning, Add reference to System.Configuration component in your project and use :string test1 = System.Configuration.ConfigurationManager.AppSettings["key1"];
Hope this helps. Thanks, Ram