I was working on the same thing. I didn't like having to modify my .csproj file, so I tried this. It is working for me so far. In my case, I was excluding the media, App_DataLogs, and App_Datapreview folders from deployment instead of the Data folder.
Basically, you can pass the ExcludeFoldersFromDeployment as a parameter to MSBuild. Combining that with the SkipExtraFilesOnServer does the trick.
/p:Configuration=Debug
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MsDeployServiceUrl=OurDevWebServer/msdeployagentservice
/p:AllowUntrustedCertificate=True
/p:MSDeployPublishMethod=RemoteAgent
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath=umbraco_TestSite
/p:IgnoreDeployManagedRuntimeVersion=True
/p:SkipExtraFilesOnServer=True
/p:ExcludeFoldersFromDeployment="media;App_DataLogs;App_Datapreview"
/p:IncludeSetAclProviderOnDestination=False
/p:AuthType=NTML /p:UserName=
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…