Visual Studio & SubVersion: About Machine Files

As an example, we have a Unit Test project with the app.config file. The app.config file is configured to work on our build server. But if we want to run our tests locally (with a local database), we have to change app.config ... everytime ... there is a way to never change the app.config file, but have a different file that overrides the application. configuration configuration? (so that no one accidentally commits a corrupted app.config in subversion?)

(the same course counts for web.config, ...)

thanks Lieven Cardoen

+3
source share
3 answers

'file' appSettings? (MSDN)

, app.config( web.config).

+2

, app.config SubVersion (app.config.release, app.config.debug), -, app.config .

app.config Subversion, app.config.production .

+2

What about a small script (I would do it in Perl) for each configuration that does the necessary changes to convert the corresponding parts (s) in app.config to local configuration, server configuration, etc.? You can have one separate project configuration for each script and call the script in the post build event.

+1
source

Source: https://habr.com/ru/post/1704814/


All Articles