1

I'm using Azure Roles and Cloud Services. So my config is no longer going to live in web./app.config, it will be in ServiceConfiguration.Cloud.cscfg and its .Local. sibling.

Each dev on the team has (optionally) their own DB for local dev (so that EF doesn't get upset) so we're all going to have different settings for local Development.

But we don't really want to have to maintain a personal commit changing the connectionstrings to our local ones, if we can help it.

In the olden days, I would have achieved this as per advice like this: http://www.asp.net/identity/overview/features-api/best-practices-for-deploying-passwords-and-other-sensitive-data-to-aspnet-and-azure or this: http://www.codeproject.com/Articles/602146/Keeping-Sensitive-Config-Settings-Secret-with-Azur Which allow some of the settings to be indirectly defined in another file, which we could then git ignore.

But all of those examples are referring to appSettings or similar - which doesn't exactly appear in the .cscfg

I'm about to try just applying the same sorts of things, but I thought I'd ask here before I start so that:

  1. if I fail then maybe someone have answered when I come back
  2. I'm more likely to come back and report the answer if/when I do solve it.

All thoughts and advice are most welcome even if they don't directly solve the question.

Brondahl
  • 7,402
  • 5
  • 45
  • 74

1 Answers1

0

This problem isn't specific to Azure. How does one maintain a default config file, while allowing individuals to use customised versions of it that play nicely with source control...

I think you're right to look for a way to do it in the framework first, but failing that I'd go for something along the lines of the answers here: git: can i commit a file and ignore the content changes?

In our case, that would entail either:

  1. Committing the config file, then ignoring it.
  2. Committing a "template" version, that users base their own copy on, and pre-emptively ignoring the version they'll create.

Bit of a general answer, but hope it helps!

Community
  • 1
  • 1