TeamCity MSbuild Deploy procedure

I'm using TeamCity for deployment process. For deploy i'm running MSbuild with this command line parameters:


I have this parameter

set to true beacause i don't want MSbuild to delete some files which i have only on service enviroment, but don't have on my local project.
But the problem is when i actually want to remove something from project (i have web application),
i usually delete file from project, then i rebuild my app, and commit the changes in project file to source control, MSbuild leave this file on service because of this parameter.
MSbuild is using Release configuration, which i specified to use "all files in this project" to deploy. So the behaviour i want to implement:
  1. TeamCity will leave all files which are not in my project reference list. (
  2. TeamCity will delete files which were in
    but was deleted from it.

Please help me with that task.

Please sign in to leave a comment.