Last week I enabled TFS publishing for a Windows Azure Website. However the deployment failed because I had multiple projects inside the solution and the build tried to deploy the wrong project.
To fix this I used the following workaround:
- Create a separate solution for the project you want to deploy and check this solution into source control.
- Open Team Explorer and connect to your TFS project
- Right click on the Build definition that was created for you when enabled TFS publishing and choose Edit Build Definition...
- Go to the Process tab and change the Solution To Build to the solution you just created.
- Next time you check in the new solution is used to build and deploy the project.