2

In my C# project, I have a setting file. When I build the project, I have .config that contains severals config string.

<applicationSettings>
 <MyProject.Properties.Settings>
  <setting name="SettingKey" serializeAs="String">
    <value>This is setting </value>
  </setting>
 </MyProject.Properties.Settings>
</applicationSettings>

I tried to change the value of SettingKey manually but no luck. I think that the value is compiled to binary and put in dll file.

So what can I do to allow editing setting value manually?

Sorry for my English.

Vu Nguyen
  • 3,605
  • 3
  • 22
  • 34
  • Possible duplicate of [Changing .NET application settings without recompiling](https://stackoverflow.com/questions/11352465/changing-net-application-settings-without-recompiling) – Cullub Aug 12 '19 at 16:12

1 Answers1

1

Wondering why you need it manually?

You can always use code to do so

Properties.Settings.Default.myColor = Color.AliceBlue;
Properties.Settings.Default.Save();

http://msdn.microsoft.com/en-us/library/bb397755(v=vs.110).aspx

Update: Changing .NET application settings without recompiling

I suppose you can't do it, as its maintained at exe level.

Community
  • 1
  • 1
Nipun Ambastha
  • 2,553
  • 1
  • 16
  • 26
  • For example, I define a flag to turn something on and off with out recompiling. How can I do that? – Vu Nguyen Apr 18 '14 at 07:54
  • Thanks, is it possible to modify? I can see that it is exe level.... so no luck. Back to my question: I want to define a flag to turn something on and off with out recompiling. How can I do that using which technology? – Vu Nguyen Apr 18 '14 at 08:01