2

I am using TDS File Replacement to manage configs. I would like to be able to do this per user, so each user can set up their environment however they wish. Right now, each user would need his or her own build configuration to do this. I could do it with a post build script, but really that has the same problem, each user would need their own build configuration. Can I configure File Replacement or a post build action in a .user file?

UPDATE For example, I want a folder for each dev, which contains configs specific to that dev, then on build, I want whats in the Website folder replaced with whats in the dev specific folder.

4
  • 1
    I'm not entirely sure what you are trying to achieve. Can you give some examples of differences between configurations that you want to allow? We enforce a project policy where every user/developer must use the same project location, deploy location, sql connectionstrings etc and use the build configuration for environment specific builds: dev, staging, production for example.
    – Koen Heye
    Commented Jan 18, 2017 at 17:29
  • We don't, which is the problem. From a political perspective, it will be easier for me to figure out how to do this then to make everyone set up the project the same way. Commented Jan 18, 2017 at 18:21
  • Having everyone follow the same conventions will allow you to create (local) setup and build scripts, using PowerShell for example. This will massively reduce the amount of time required to on-board someone new. Something to keep in mind.
    – jammykam
    Commented Jan 18, 2017 at 18:27
  • Its a question of authority... as in I dont have it Commented Jan 18, 2017 at 20:11

1 Answer 1

2

You can add your own replacement configuration into a .user file.

<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
 <Replacement Include="[source folder]">
  <TargetPath>[target folder]</TargetPath>
  <IsFolder>True</IsFolder>
 </Replacement>
</ItemGroup>
1
  • Could you elaborate? A .user version of the.scproj file? Do I need to just have this one ItemGroup in the .user file? Commented Jan 19, 2017 at 18:15

Your Answer

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

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