1

I have a batch file creating a config file that I don't want to share with all team mates over SVN because it's used for developer specific settings. The config file is called from app.config and is necessary in order to build the project and I don't want anyone to have an issue if they build the solution or just the project itself.

Is there a way I can add my newly created config file to the project automatically through the pre-build event?

Here's the code I'mn running in my pre-build event:

if not EXIST "$(ProjectDir)\Config\Dev.config" (
  cd $(ProjectDir)
  call "$(ProjectDir)\Config\Create_DevConfig.bat"
)
MicMan
  • 31
  • 5
  • Maybe its better if you just .ignore the config file (which is the usual way) instead adding it as pre-build event. IMO. – Nekeniehl Nov 12 '18 at 14:03
  • I need the file and others will need the file too (without my specific logins, etc.) and the project is part of a solution they should be able to build without knowing the details of this project. Ignoring it in SVN is part of what I did though. – MicMan Nov 21 '18 at 09:00
  • In that case what we do, its check-in the default configuration file, as `config_sample`, everybody downloads it, and change it to the normal `config` which is on .ignore with his own config parameters. – Nekeniehl Nov 21 '18 at 09:06

1 Answers1

0

It turns out I had already fixed it when I had included it in the project but I had removed it from SVN. Then it wasn't just some "random" file flying around outside the project by itself, even when it was re-created.

MicMan
  • 31
  • 5