BugFix: ARM Deployment project deployment.targets sets ArtifactStagingDirectory to null
There seems to be a minor bug in the Deployment.targets file in Azure Resource Group deployment projects (VS 2015 in my case). When we upgraded our TFS servers to TFS 2015, the staging folders created during the builds disappeared from the drop folder. When we looked for them, we found they were getting copied to the root of the C: drive on the build agents.
The bug is in the _CalculateArtifactStagingDirectory target in the deployment.targets file (line 89 in my case).
<artifactstagingdirectory condition=" '$(TFBuild)' == 'True' ">$(BuildStagingDirectory)</artifactstagingdirectory>
<artifactstagingdirectory condition=" '$(BuildStagingDirectory)' != '' AND '$(TFBuild)' == 'True' ">$(Build_StagingDirectory)</artifactstagingdirectory>
What's happening in this case is that the $(Build_StagingDirectory) variable is null and so without the proper conditional checks the $(ArtifactStagingDirectory) gets set to null and that turns into C:\
(I have sent this feedback through VS as well).
Thanks Mark, we’ll have a look
Mark - are you running this from a XAML build template?