12

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?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Paul
  • 653
  • 6
  • 15
  • 1
    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 Dec 03 '15 at 10:30
  • 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 Dec 03 '15 at 14:07
  • Issue on Github: https://github.com/Microsoft/TypeScript/issues/5894 – Jiří Zídek Dec 03 '15 at 18:29
  • 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 Dec 03 '15 at 20:32
  • https://github.com/JiriZidek/Garbage/blob/master/Broken_build_TS17.zip – Jiří Zídek Dec 03 '15 at 22:11
  • Thanks, but I need the 'diagnostic' log, which you can create when you use the `/v:diagnostic /fl` command line options for msbuild. – Paul van Brenk Dec 03 '15 at 22:14
  • @PaulvanBrenk Same error here with VS 2015 (no TFS involved) running package command on an Azure project. VS2015 update 1 + Azure SDK 2.8 + Typescript 1.7. – Jude Fisher Dec 05 '15 at 02:46
  • One scenario this happens is when `$(OutDir)` is specified in the project file, which generally only happens on build servers. I checked in a fix for that. and we're working on getting a release out, so you can validate against your scenarios. – Paul van Brenk Dec 07 '15 at 23:01

6 Answers6

2

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

Jiří Zídek
  • 416
  • 3
  • 9
2

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
Suresh Karia
  • 17,550
  • 18
  • 67
  • 85
  • This worked for me. Though it might not work for everyone else depending on other settings being used. It looks like the proper fix will have to come from the TypeScript team. – Paul Dec 04 '15 at 15:46
2

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

Paul
  • 653
  • 6
  • 15
0

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.

J F
  • 631
  • 7
  • 15
0

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
Waes
  • 1
  • In fact we use only _PublishedWebsites content, so we cannot disable its generation... – Jiří Zídek Dec 04 '15 at 08:39
  • As a sidenote if you want to disable _PublishedWebsites for good you can place the following inside the .csproj of the project involved: True – XDS Feb 14 '18 at 12:42
0

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

Don Rolling
  • 2,301
  • 4
  • 30
  • 27