msbuild deploy to folder code example
Example: msbuild publish to folder command line .net
msbuild mysln.sln /p:DeployOnBuild=true /p:PublishProfile=<profile-name>
msbuild mysln.sln /p:DeployOnBuild=true /p:PublishProfile=<profile-name>