2

I have a solution that I am trying to get TFS 2010 to deploy after it builds.

When I run the following msbuild command locally, it deploys fine:

msbuild C:\Path\to\Solution.sln /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=WMSVC /p:MSDeployServiceUrl=https://[Server]:8172/MsDeploy.axd /p:DeployIisAppPath="TestSite" /p:UserName=Domain\Username /p:Password=NotTheRealPassword /P:AllowUntrustedCertificate=True

However, when I stick those same options into the TFS 2010 build MS Build arguments:

enter image description here

...it doesn't appear to execute anything.

The build finishes correctly:

enter image description here

But I see nothing in the entire log file related to deployment, etc. It's as if the parameters were never even passed in to MSBuild from TFS.

The MSBuild Command Being Called by TFS

The log has it as (scrubbed sensitive data): C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "C:\Builds\1\[Scrubbed]\Daily6am\Sources\[Scrubbed].sln" /m:1 /fl /flp:"logfile=C:\Builds\1\[Scrubbed]\[Scrubbed]\Sources\[Scrubbed].log;encoding=Unicode;verbosity=normal" /p:SkipInvalidConfigurations=true /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:MSDeployPublishMethod=WMSVC /p:MSDeployServiceUrl=https://[Scrubbed]:8172/MsDeploy.axd /p:DeployIisAppPath="TestSite" /p:UserName=[Scrubbed]\farmservice /p:Password=[Scrubbed] /p:AllowUntrusted=True /P:AllowUntrustedCertificate=True /p:OutDir="C:\Builds\1\[Scrubbed]\[Scrubbed]\Binaries\\" /p:Configuration="Debug" /p:Platform="Any CPU" /p:VCBuildOverride="C:\Builds\1\[Scrubbed]\[Scrubbed]\Sources\[Scrubbed].sln.Any CPU.Debug.vsprops" /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;BuildUri=vstfs:///Build/Build/23;InformationNodeId=4504;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://[Scrubbed]:8080/tfs/[Scrubbed]_Collection;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;"

Questions

  • How can I get TFS to tell MSBuild to build the deployment?
  • How can I verify whether the parameters were even passed in?
  • How can I correctly read the logs to know if this has taken place or not?

Assistance on any of these would be much appreciated.

4
  • Try changing the deployment URL to a bogus address and see if you still see nothing in the log. Commented Nov 1, 2013 at 14:59
  • Hi John -- see my answer below. Just a few minutes ahead of you, but it's what solved it for me. Commented Nov 1, 2013 at 15:47
  • I saw your answer, but wanted to know whether something shows in the log if you use a bogus URL. Commented Nov 1, 2013 at 17:19
  • Oh I see -- sorry, I didn't understand. I'll check a little later today with a new build and let you know. Thanks! Commented Nov 1, 2013 at 18:00

1 Answer 1

2

I was able to find the answer on a SO question from a bit ago :)

According to the answer at this SO Question, @marvc1 (credit where it's due) suggested copying the following files:

  • C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web
  • C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications

I had copied WebApplications, but not Web. Copying web resolved the issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.