开发者

C#: .Config File and write issue in program folder

开发者 https://www.devze.com 2023-02-02 05:21 出处:网络
i use the ConfigurationManager to store some app-config开发者_如何转开发urationvalues. Since i start my app from the program folder i cant save config-changes...

i use the ConfigurationManager to store some app-config开发者_如何转开发urationvalues. Since i start my app from the program folder i cant save config-changes...

I cant write in the program folder... I know that its good practise to store data in %AppData% or %Temp%, but i want my config-File in the same folder as the executable.

How can i handle this problem?


3 options:

  • run your process with administrator privileges (not good if you don't need them)
  • put your exe somewhere not in Program Files
  • store your config in AppData (best)
0

精彩评论

暂无评论...
验证码 换一张
取 消