Hello all,
Can someone tell me where this is? Most places on the net say it's in same folder as the .exe, but when I look in there I don't see it. There is an .xml file in there but that doesn't look like it's it.
Thanks,
Strick
Printable View
Hello all,
Can someone tell me where this is? Most places on the net say it's in same folder as the .exe, but when I look in there I don't see it. There is an .xml file in there but that doesn't look like it's it.
Thanks,
Strick
after building it takes on the name of yourapp.exe.config ....and yes, it should be in the same place as your app. Also, make sure you're looking in the right place for it... meaning it will be in the debug or release folder in the bin directory.
-tg
Yeah, it's the weirdest thing. Even after right clicking the project in solution explorer and clicking build it wasn't there. I also tried "build solution" and "rebuild solution" under buil menu and still no .config file. Not sure what I'm doing wrong.
Strick
Does it always generate a config file? or only if you have Application settings that need to be stored? You might try adding a setting in the Project's properties as an Application setting, then build the project to see if it appears.
To add, the file must be there. Because I can access it and add to it from my program:
But when I go to bin folder it's not there.Code:Dim config As Configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
config.AppSettings.Settings.Add("MyKey", "MyValue")
'Save the configuration file
config.Save()
For i As Integer = 0 To ConfigurationManager.AppSettings.Count - 1
Console.WriteLine("{0}: {1}", ConfigurationManager.AppSettings.AllKeys(i), ConfigurationManager.AppSettings(i))
Next
Console.ReadKey()
You may be getting the User.config file... which is stored in the user's profile.
-tg