I have a strange issue where one of my builds is failing to create the web deployment package that other similar builds are creating. I am running TFS 2013.2 and all my clients are VS2013.2. Build server is also TFS 2013.2. The web application is .NET 4.5.1.
The purpose of the solution is to build and deploy two web applications using web deploy (publish profiles). The first applications compiles and deploys just fine. The second one fails very strangely.
The gist of what I think is going on is that the build service is copying source files to a temporary location to be zipped up. Here's a chunk from the log:
CopyAllFilesToSingleFolderForPackage:
Creating directory "obj\Development\Package\PackageTmp".
Copying all files to temporary location below for package/publish:
obj\Development\Package\PackageTmp.
Copying Scripts\path\production\Constants.js to obj\Development\Package\PackageTmp\Scripts\path\production\Constants.js.
Copying Scripts\path\production\Directives.js to obj\Development\Package\PackageTmp\Scripts\path\production\Directives.js.
Copying Scripts\path\production\ProductModule.js to obj\Development\Package\PackageTmp\Scripts\path\production\ProductModule.js.
Copying Scripts\path\production\Controllers.js to obj\Development\Package\PackageTmp\Scripts\path\production\Controllers.js.
Copying Scripts\path\production\Models.js to obj\Development\Package\PackageTmp\Scripts\path\production\Models.js.
Copying Scripts\path\production\Services.js to obj\Development\Package\PackageTmp\Scripts\path\production\Services.js.
Copying Scripts\path\path3\path3Controller.js to obj\Development\Package\PackageTmp\Scripts\path\path3\path3Controller.js.
Copying Scripts\path\path3\path3Module.js to obj\Development\Package\PackageTmp\Scripts\path\path3\path3Module.js.
Copying Scripts\path\path3\Directives.js to obj\Development\Package\PackageTmp\Scripts\path\path3\Directives.js.
Copying Scripts\path\path3\Filters.js to obj\Development\Package\PackageTmp\Scripts\path\path3\Filters.js.
Copying Scripts\path\path3\DetailController.js to obj\Development\Package\PackageTmp\Scripts\path\path3\DetailController.js.
Copying Scripts\path\path3\ListController.js to obj\Development\Package\PackageTmp\Scripts\path\path3\ListController.js.
Copying Scripts\path\path3\Models.js to obj\Development\Package\PackageTmp\Scripts\path\path3\Models.js.
Copying Scripts\path\path3\Services.js to obj\Development\Package\PackageTmp\Scripts\path\path3\Services.js.
CleanWebsitesWPPAllFilesInSingleFolder:
Removing directory "obj\Development\Package\PackageTmp".
You can see it's copying from the source to some temporary directory. Directly after, it completes removes that directory for whatever reason.
Then, it runs through a number of other actions such as
ValidateGlobalPackageSetting
CollectFilesFromIntermediateAssembly
CollectFilesFromContent
CollectFilesFromIntermediateSatelliteAssembliesWithTargetPath
CollectFilesFromReference
CollectFilesFromAllExtraReferenceFiles
CollectFilesFrom_binDeployableAssemblies
PipelineCollectFilesPhase
PreTransformWebConfig
TransformWebConfigCore
PostTransformWebConfig
PreProfileTransformWebConfig
PipelineTransformPhase
GetMSDeployInstalledVersionPath
ProcessPublishDatabaseSettings
PreAutoParameterizationWebConfigConnectionStrings
AutoParameterizationWebConfigConnectionStringsCore
PostAutoParameterizationWebConfigConnectionStrings
PipelineMsdeploySpecificTransformPhase
GenerateGlobalPublishSetting
Then we get to where it appears to want to create teh publish package for real this time
CopyAllFilesToSingleFolderForMsdeploy
Creating directory "obj\Development\Package\PackageTmp".
Copying all files to temporary location below for package/publish:
obj\Development\Package\PackageTmp.
Copying obj\Development\Package\PackageTmp\Scripts\path\path2\Constants.js to obj\Development\Package\PackageTmp\Scripts\path\path2\Constants.js.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(2660,5): error : Copying file obj\Development\Package\PackageTmp\Scripts\path\path2\Constants.js to obj\Development\Package\PackageTmp\Scripts\path\path2\Constants.js failed. Could not find file 'obj\Development\Package\PackageTmp\Scripts\path\path2\Constants.js'. [D:\Builds\1\path.Web\Portal_Dev\Sources\Portal\Trunk\Code\path.Portal\path.Portal.Web\path.Portal.Web.csproj]
Done Building Project "D:\Builds\1\path.Web\Portal_Dev\Sources\Portal\Trunk\Code\path.Portal\path.Portal.Web\path.Portal.Web.csproj" (default targets) -- FAILED.
The strange part is that it's NOT copying from the source. It's attempting to copy from the temp location. First, the temp location has already been cleared. Second, that really doesn't make any sense at all to copy from obj\Package to onj\Package and not from Scripts\ to onj\Package
Here's the msdeploy argument that i'm using. It's working as is on several different builds.
/p:DeployOnBuild=true;PublishProfile=Development;DeployTarget=MSDeployPublish;MSDeployPublishMethod=RemoteAgent;MsDeployServiceUrl=http://someServer:9090;SkipExtraFilesOnServer=true;username=
My build template is a bit old, but I'm not having issues with any other builds or deployments.
I know there's probably more stuff I should provide. Please let me know what else I can add to help trouble shoot
EDIT: I mention typescript in the title. All of the files it's trying to copy are JS files generating from Typescript. They all have their build action set properly. The other we application project in this solution has no typescript at all and builds and deploys fine.
Also it's worth mentioning that if I manually publish from visual studio using the profile specified in my command line arguments, everything deploys just fine.