Using Team Foundation Server continuous deployment with Web Depoly, is it possible to stop certain folders being deployed? And if it is, how?
UPDATE
You can't specify a skip rule via the command line (as in, an MSBuild Argument) because they are declared as items, not properties.
A skip command can be specified in a publish profile. However it seems publish profiles are only for the inbuilt publishing in visual studio, not Web Deploy 3.
Is there a way for Web Deploy to accept a publish profile, and if there is, should this be checked into TFS?
It sounds like you are confusing the MSDeploy command line with executing MSBuild via the command line.
If you are executing msdeploy.exe or the generated deploy.cmd file, MSBuild doesn't even come into it and you are free to use the MSDeploy Skip Command (you can append additional command line arguments to the cmd call and they will be passed to msdeploy.exe).
If you are using MSBuild + "DeployOnBuild" or MSBuild + publish profiles you will need to declare your skip requirements as MsDeploySkipRules
items. If you're building your package separately before this point and want to deploy it, you're going to run into some roadblocks.
I also had the same issue, however found that there is switch you can use that does not require a profile. Having said that, a profile has other benefits.
Here is the argument I used that works
/p:SkipExtraFilesOnServer=true