2

What I thought would be simple is not. All I am trying to do is get MSBuild to copy website files to another server after my build.

In my Build definition Under Process --> Advance --> MSBuild Arguments I put

/p:DeployOnBuild=true /p:PublishProfile=WebsiteProfile

It builds fine but it never copies files to destination

BUT when I run this command locally, IT WORKS!!!!!

msbuild /p:DeployOnBuild=true /p:PublishProfile=WebsiteProfile

I have VS 2012 installed in Build Server so I think all the necessary files are there.

What is the problem?

UPDATE 1

Output in build log file

Run MSBuild for Project

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "C:\Builds\1\MyProject\MyProject\src\MyProject.sln" /nr:False /fl /flp:"logfile=C:\Builds\1\MyProject\MyProject\src\MyProject.log;encoding=Unicode;verbosity=detailed" /p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:PublishProfile=WebsiteProfile /p:VisualStudioVersion=11.0 /m /p:OutDir="C:\Builds\1\MyProject\MyProject\bin\\" /p:RunCodeAnalysis="False" /p:VCBuildOverride="C:\Builds\1\MyProject\MyProject\src\MyProject.sln.vsprops"  /dl:WorkflowCentralLogger,"E:\Microsoft Team Foundation Server 11.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Detailed;BuildUri=vstfs:///Build/Build/64;InformationNodeId=20178;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://abc-tfs-p:8080/tfs/defaultcollection;"*WorkflowForwardingLogger,"E:\Microsoft Team Foundation Server 11.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Detailed;"

REPRODUCTION STEPS

  1. Created new website project
  2. Made sure it worked on local machine using development server
  3. Checked code in TFS
  4. Created a build definition using all the default settings Under the Process --> Advance --> MSBuild Arguments I put

/p:DeployOnBuild=true /p:PublishProfile=WebsiteProfile

The publish profile copies the changeset to a remote server.

2
  • Sounds like a permission thing. Does the build agent have the appropriate perms on the target server? Commented Jul 23, 2013 at 9:12
  • How would I check that? Commented Jul 24, 2013 at 13:28

1 Answer 1

2

Installing the Web Tools 2012.2 update on the build server fixed this issue for me after I read this post and Scott Gu's Blog. I don't have Visual Studio installed on the server but installing the update got my DeployOnBuild working. I hope that helps.

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.