Question

We have a TFS build definition set up where we pass the following extra MSBuild arguments in:

/p:DeployOnBuild=true;DeployTarget=PipelinePreDeployCopyAllFilesToOneFolder;_PackageTempDir="\\server\build";AutoParameterizationWebConfigConnectionStrings=false

This has been detailed elsewhere as a way to have the published files copied to a specific location instead of generating a deploy package.

This unfortunately does not work on our build server, however if I run the exact same msbuild command line as called by TFS on my dev machine then it works perfectly and copies the output files to the location.

I have checked the log file and there is no errors, it just seems to completely skip the publish/deploy step.

Done building target "_BuiltWebOutputGroupOutput" in project "xyz.csproj".
Target "PrepareForRun" in file "c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets" from project "C:\Builds\2\xyz\xyz build\Sources\xyz.Web\xyz.Web.csproj" (target "CoreBuild" depends on it):

whereas on my local machine, after _BuiltWebOutputGroupOutput target is run the package target runs and deploys the files correctly.

I have tried using different paths and even setting the properties in the project file but it seems to make no difference. My local solution and project files are the same as in the repository that the TFS build is using. Is there something config related on our build server or with the build agent that would cause the packaging target not to run?

Was it helpful?

Solution

I was having a similar problem today and found a fix so it maybe worth a look for you. Here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top