3

I have simple Visual Studio(VS) application which I have a settings file with. I created the settings file using VS and clicking on setting and adding in a few variables.

I plan on letting people change this setting file to fit their needs and would like to be able to tell them the directory it is located in. Currently, I have to go to my AppData directory and do a search for Appname.exe.config and it finds it in a folder like this:

C:\Users\USERNAME\AppData\Local\Apps\2.0\REDNZL3H.0XK\RJKNMQ3B.60H\Simp..tion_e2fd61b4844bc401_0001.0000_d3b6c2e2b08ad12c

This doesn't really make sense.

How do you configure VS to save your appname.exe.config file in a decent directory / something I define ?

Maybe something like:

C:\Users\Username\AppData\Local\Apps\MySimpleApp\Appname.exe.config 

Update:

After learning about the click once installer, I think this may be a better solution. Best Way to Deploy Visual Studio Application that can run without Installing This allows me to just create a zip folder for a simple app, add in all the necessary files (like the settings file) and just distribute it this way. Then I can put the files wherever I want.

Community
  • 1
  • 1
RWhiten
  • 163
  • 6

1 Answers1

0

By default, new variables added with User scope, therefore config file located in AppData directory. Try change variable scope to Application value.

neodim
  • 468
  • 4
  • 15
  • I uninstalled program. Changed scope to application. Published then installed again. Still gives me very similar if not the same directory structure. – RWhiten Feb 10 '14 at 05:37
  • If I understand correctly, you are using ClickOnce? It is installed to Application Cache and you cant change location. – neodim Feb 10 '14 at 05:44
  • Yes I was. Thank you. You have saved me some time looking more into this and I have decided to go another route now. – RWhiten Feb 10 '14 at 05:55