I'm using the following powershell script to build a web project:
$tools = @()
$tools += "C:\Windows\System32" #xcopy
$tools += "C:\Windows\Microsoft.NET\Framework\v4.0.30319" #msbuild
$env:Path = [string]::join('; ', $tools)
msbuild ROS.EDI.Web/ROS.EDI.Web.csproj `
/p:DeployOnBuild=true `
/p:PublishProfile=$config `
/p:Configuration=$config `
/p:Platform=AnyCPU `
/p:DefineConstants=$constants `
/property:ApplicationVersion=$env:BUILD_NUMBER `
/property:ApplicationRevision=$env:BUILD_VCS_NUMBER
The script completes and msbuild runs without error on both my dev machine and the build server. However, the step that publishes the web project to the local file system does not run on the build server.
Here is the relevant output from msbuild on my dev machine
PipelinePreDeployCopyAllFilesToOneFolder:
Publish Pipeline Deploy phase Stage ...
WebFileSystemPublish:
...
And on the build server
PipelinePreDeployCopyAllFilesToOneFolder:
Publish Pipeline Deploy phase Stage ...
Package:
Invoking Web Deploy to generate the package with ...
I'm trying to figure out why the "Package" step is running on the build server instead of "WebFileSystemPublish". What can cause the same version of msbuild to behave differently on two different machines?
Before you mark this as a duplicate I have read the following and tried their solutions to no avail: