1
  • If yes, then what if you have different patches for different environments?
    • Would you then put a transform(for publishing) on the Patch.config file?

(same question - put transforms on ConnectionStrings.config and include that in source/publish too?)

3
  • 1
    ConnectionStrings.config should NEVER be in source control.
    – Richard Seal
    Oct 8, 2019 at 20:41
  • Hi @RichardSeal - interesting, I hadn't come across that view so strongly before. If you could flesh that out into an answer as to why, and suggested approach, I think that'd be really beneficial! Oct 8, 2019 at 20:58
  • 1
    For an answer on the Connection Strings, you should open a new question, as it would not directly relate to your main question. As per SSE guidelines, each post should only deal with a single question.
    – Richard Seal
    Oct 9, 2019 at 12:40

1 Answer 1

5

Yes they should be.

Depending on your build/deployment setup you may find that replacement variables enable you to have fewer patches and to differentiate between environments. Alternatively you can have patches for each environment and remove when packaging up artifacts before deployment.

The same would hold true for configuration transforms. The build server pulls the latest changes from source control at which point configuration transforms can be processed.

As may be pointed out by many in the community, storing any file which contains paths to databases, passwords, and anything sensitive should not be in the file committed to source control. This is where variable replacements come in handy.

3
  • Hi Michael, thanks for this. Would it also be fair to say that you should not have any of the base/vanilla .config files in source? (.config files you get from the base install via SIM for example) Oct 8, 2019 at 22:04
  • In most cases, any file that is included with a vanilla Sitecore installation should not be tracked by source control. Oct 9, 2019 at 0:17
  • Michael, sounds good. Of course FYI I'm taking source control/project interchangeably here :) so if not in source then also not in the VS project of course. Oct 9, 2019 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.