Wheres my data when app.config is an Embedded Resource
-
Ok I you create a new C# windows project and then create a ".settings" with an item (string) and (user) as the type. Now this will create an app.config file associated with the project. Go into the properties for the app.config and change the Build Action to (Embedded Resource). Now in your windows form create and edit box and a button which loads and saves the setting that your created. Build the project. Go into the bin folder and click on the exe file to run the project. Try changing the settings and saving the settings. Close the project and load it back up by clicking on the exe file to verify that the save works which it will. BUT WHERE DOES IT SAVE TOO?????????? I cant figure it out...... Chris
-
Ok I you create a new C# windows project and then create a ".settings" with an item (string) and (user) as the type. Now this will create an app.config file associated with the project. Go into the properties for the app.config and change the Build Action to (Embedded Resource). Now in your windows form create and edit box and a button which loads and saves the setting that your created. Build the project. Go into the bin folder and click on the exe file to run the project. Try changing the settings and saving the settings. Close the project and load it back up by clicking on the exe file to verify that the save works which it will. BUT WHERE DOES IT SAVE TOO?????????? I cant figure it out...... Chris
Hi, It saves it somewhere in C:\Documents and settings\UserName\LocalSettings\Application Data \Your Application Name .Exe XXXXXXXXXXXXXXXXXXXXXXXXXXX\VersionNumber\user.config Try search *.config in your documents and settings and u will find it. That's because .Net wants to save Config settings for each Windows user. so it does not touch the application.config file that can be shared between many users. That happens even u don't set the Build action to Embedded Resource wich is not logic because the config file must not be embedded in the exe. HTH. Hayder Marzouk
-
Hi, It saves it somewhere in C:\Documents and settings\UserName\LocalSettings\Application Data \Your Application Name .Exe XXXXXXXXXXXXXXXXXXXXXXXXXXX\VersionNumber\user.config Try search *.config in your documents and settings and u will find it. That's because .Net wants to save Config settings for each Windows user. so it does not touch the application.config file that can be shared between many users. That happens even u don't set the Build action to Embedded Resource wich is not logic because the config file must not be embedded in the exe. HTH. Hayder Marzouk
Thanks I see it.