1
votes

This is related to a question I asked yesterday but is probably best asked separately.

I have a TFS 2010 server running a build of a .csproj file, and an IIS6 box with msdeploy installed on it. I want to get the build automatically published by the build, but it never tries to run the publish no matter what I send into its parameters. I can put DeployTarget=TotalCarp and it still runs without error, but does not attempt to publish.

Heres the section of log from the build that is relevant:

Run MSBuild for Project

Initial Property Values
AdditionalVCOverrides =
CommandLineArguments = /p:SkipInvalidConfigurations=true /p:DeployOnBuild=True /p:DeployTarget=TotalCarp /p:MsDeployPublishMethod=RemoteAgent /p:DeployIisAppPath="WebRoot/ExternalContractSupportWeb" /p:MsDeployServiceUrl=whatever /p:AllowUntrustedCertificated=True /p:UserName=Username /p:Password=Password
Configuration = Test
GenerateVSPropsFile = True
LogFile =
LogFileDropLocation = \g10svhudtfs\TFSBuilds\ExternalContractSupport\TestBuild\TestBuild_20101101.25\logs
MaxProcesses = 1
OutDir = C:\Builds\1\CustomerTerms\TestBuild\Binaries
Platform = Any CPU
Project = C:\Builds\1\CustomerTerms\TestBuild\Sources\ExternalContractSupportWeb\ExternalContractSupportWeb.csproj
ResponseFile =
RunCodeAnalysis = AsConfigured
Targets =
TargetsNotLogged = String[] Array
ToolPath =
ToolPlatform = Auto
Verbosity = Diagnostic

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe /nologo /noconsolelogger "C:\Builds\1\CustomerTerms\TestBuild\Sources\ExternalContractSupportWeb\ExternalContractSupportWeb.csproj" /m:1 /fl /flp:"logfile=C:\Builds\1\CustomerTerms\TestBuild\Sources\ExternalContractSupportWeb\ExternalContractSupportWeb.log;encoding=Unicode;verbosity=diagnostic" /p:SkipInvalidConfigurations=true /p:DeployOnBuild=True /p:DeployTarget=TotalCarp /p:MsDeployPublishMethod=RemoteAgent /p:DeployIisAppPath="WebRoot/ExternalContractSupportWeb" /p:MsDeployServiceUrl=whatever /p:AllowUntrustedCertificated=True /p:UserName=Username /p:Password=Password /p:OutDir="C:\Builds\1\CustomerTerms\TestBuild\Binaries\" /p:Configuration="Test" /p:Platform="Any CPU" /p:VCBuildOverride="C:\Builds\1\CustomerTerms\TestBuild\Sources\ExternalContractSupportWeb\ExternalContractSupportWeb.csproj.Any CPU.Test.vsprops" /dl:WorkflowCentralLogger,"D:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;BuildUri=vstfs:///Build/Build/49;InformationNodeId=5798;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=http://g10svhudtfs:8080/tfs/TFSCollection;"*WorkflowForwardingLogger,"D:\Program Files\Microsoft Team Foundation Server 2010\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Diagnostic;"

Everything I've found on the web has at least an error code but this looks as though its worked but is obviously making no attempt to even try and deploy anything?

1
What ended up happening with this?Sayed Ibrahim Hashimi

1 Answers

5
votes

I just looked at this more and this will be the behavior you get if the files at %Program Files32%\MSBuild\Microsoft\VisualStudio\v10.0\Web are not on the machine. The reason for this is because the Web Application Project imports the file <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> which is installed by Team Build, then that file contains the import <Import Project="..\Web\Microsoft.Web.Publishing.targets" Condition="Exists('..\Web\Microsoft.Web.Publishing.targets')" /> which contains the logic for the Web Publishing Pipeline (WPP). Which are the targets which read DeployTarget, BuildOnDeploy, etc. The fact that the import is conditional is the reason that you are not getting an error. I am going to ask the dev why its conditional.