1

I'm wanting to sell a small C# windows forms tool online. As part of the automation chain of selling the software, I would like to call an automated build process, which can add an email address to the build process which will 'insert' the email adress into the application code. For example, "this product is registered to : john@smith.com". I want this to be hard coded into the application as a Label, or a Textbox, not inside an external app.config. What options do I have for this?

Thanks

user989056
  • 1,275
  • 2
  • 15
  • 33

1 Answers1

0

You take your build server job (you do use a kind of build server, right? TFS, TeamCity, Bamboo or the like?) and add a step before you call msbuild but after you checked out your source code from version control (you do use version control, right? SVN, Git, TFS?) and insert a script that changes a line of your source code. If your build system supports it, it should be a variable in your build plan, so you can start your build for "user=John@Smith.com" and the result will be your unique executable.

Those are a lot of if's and when's, but without any knowledge of your toolchain, answers to a vague question will have to be vague, too.

nvoigt
  • 75,013
  • 26
  • 93
  • 142
  • Hi, thanks for your answer, my question is vague because I really don't have a toolchain set up, which is why answers like yours here are great! I can now research these tools and how to use them. I was actually going to do it the old school way, with a command line based build approach that I can call from other applications. I want the whole chain to be automatic, rather than me having to press any buttons. – user989056 Feb 15 '15 at 13:59