0
votes

I've been trying to get TeamCity to work with an MVC 5 project. It builds the project successfully but is failing when it comes to use MSDeploy. The error is:

[VSMSDeploy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4255, 5): 
Web deployment task failed. ('Microsoft.Web.Deployment.DeploymentBaseOptions' does 
not contain a definition for 'UserAgent')

Looking in the file it talks about I can see this:

<!-- UserAgent string sent to msdeploy -->
<PropertyGroup>
  <_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' != 'true'">$(VisualStudioVersion):CmdLine</_MSDeployUserAgentSource>
  <_MSDeployUserAgentSource Condition=" '$(BuildingInsideVisualStudio)' == 'true'">$(VisualStudioVersion):PublishDialog</_MSDeployUserAgentSource>
  <_MSDeployUserAgent>VS$(_MSDeployUserAgentSource)</_MSDeployUserAgent>
</PropertyGroup>

So, I don't know if I need to alter this somehow.

I don't have VisualStudio 2013 installed on my TeamCity server, which is running this version: TeamCity Professional 8.0.5 (build 27692).

I have though installed MSBuild (Team city unmet requirement: MSBuildTools12.0_x86_Path exists). If I go to the folder where the cmd.deploy is created and run it from the command line then it deploys fine. I'm wondering how to specify the UserAgent.

1

1 Answers

9
votes

The solution is to update Web Deploy to version 3.5.