質問

I have a project with a custom pre-build step which modifies my app.config file. This modification will propagate to a Settings.settings file in the project, but only if I double-click this Settings.settings file and click Yes in the dialogs which prompt me to perform the update.

What I'm looking for is a way to skip that manual step of needing to double-click the Settings.settings file and click Yes when prompted. In other words, I would like a way to automatically update this Settings file so that other contributors to the project won't need to remember to do this every time.

At this point I'm willing to accept roundabout methods, though manually modifying the .settings file is on the extreme end. Visual Studio already knows how to do it, so I'd like to leverage that fact if possible.

役に立ちましたか?

解決

  1. I don't think it can be done (except modifying the file manually and them to it as well). Not sure.
    .
    The argument is whether this matters:

  2. My understanding is that the app in runtime will look for the value in app.config and this value will override anything else. The value in settings will only be used in the absence of the app.config values. So, you don't really need to change the values in .settings. I'd leave them always empty or something.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top