TeamCity MSbuild Deploy procedure

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

/P:Configuration=Release
/P:DeployOnBuild=True
/P:DeployTarget=MSDeployPublish
/P:MsDeployServiceUrl=serviceUrl
/P:DeployIisAppPath=website
/P:AllowUntrustedCertificate=True
/P:MSDeployPublishMethod=WMSvc
/P:username=username
/P:Password=password
/P:SkipExtraFilesOnServer=True
/P:VisualStudioVersion=10.0

I have this parameter

P:SkipExtraFilesOnServer
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. (
    .csproj
    file).
  2. TeamCity will delete files which were in
    .csproj
    but was deleted from it.

Please help me with that task.

Please sign in to leave a comment.