12
votes

I installed Visual Studio 2015 Update 1 onto our build server and now I am getting errors copying the Typescript/Javascript files after the compilation completes.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\WebApplications\Microsoft.WebApplication.targets(182,5): error MSB3021: Unable to copy file "C:\Builds\1\XXX\XXX Continuous Integration\src\XXX\Trunk\XXX\XXX.Web\Content\Scripts\Admin\Reports.js" to "C:\Builds\1\XXX\XXX Continuous Integration\bin_PublishedWebsites\XXX.Web\C:\Builds\1\XXX\XXX Continuous Integration\src\XXX\Trunk\XXX\XXX.Web\Content\Scripts\Admin\Reports.js". The given path's format is not supported.

It looks like the output path is being built incorrectly - the output directory is being added a second time. Has anyone else had this issue after upgrading to Visual Studio 2015 Update 1?

6
Are you using TFS 2015 Update1? Are you using XAML build or vNext build? Could you provide your steps? I'd like to reproduce your scenario to see whether I can get the same issue.Cece Dong - MSFT
We have the same issue. On buildserver I applied VS2015 update 1, but TFS is 2013. It looks as problem of interpretation of command line of tsc 1.7, not problém of tfs itself. With TS 1.6.3 it worked well. Build ddefinition and "TypeScript Build" tab in project remained teh same.Jiří Zídek
Can you send me diagnostic build logs so I can try to figure out what's happening? paul(dot)van(dot)brenk(at)Microsoft(dot)com The issue on GitHub, actually revers to VS 2013, not VS 2015.Paul van Brenk

6 Answers

2
votes

Workaround:

1) Create publish profile "Web Deploy Package"

2) Add to your build definition:

/p:Disable_CopyWebApplication=True /p:DeployOnBuild=true; 
PublishProfile=publish_profile_name
2
votes

Solved by 1.7.6 release of typescript: http://go.microsoft.com/fwlink/?LinkID=717098

Obsolete:

As a workaround I found two options:

A) Precompile (legacy) - TS files mark as Content - precompile TS to JS & MAP on dev VS, include in project, check-in

B) In TypeScript build tab use "Combine Javascript output info one file" and set to Scripts\app.js

2
votes

This issue is fixed in Typescript version 1.7.6. Upgrade to resolve the build issue.

0
votes

Yes, I'm seeing this too (though locally — we do not use TFS, but we use a checked-in Microsoft.WebApplication.targets file) after installing Update 1. It actually copies the files fine to disk for me, but the build fails and ends prematurely. Also, the error messages are only generated for 16 files (.js, .js.map) out of several hundred, in a certain directory/TypeScript module. I'm not sure if it's just quashing the rest of the errors, but I tried renaming the directory name in case something was up with its name (it was named Common). No dice.

0
votes

As a workarround you could disable copy to _PublishedWebsites by adding an MSBuild argument to your TFS build definition like this:

/p:Disable_CopyWebApplication=True
0
votes

I'm not 100% sure we had the same issue, but I followed @Paul advice and upgraded. That worked for sure.

I'm posting here because I had to upgrade "TypeScript for Visual Studio 2015" on the TFS Build Server and wanted to make that clear.

Here's the link to the 2.0 upgrade https://www.microsoft.com/en-us/download/details.aspx?id=48593