TFS Build error after installing Visual Studio 2015 Update 1

…衆ロ難τιáo~ 提交于 2019-12-18 12:24:32

问题


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?


回答1:


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:


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




回答3:


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




回答4:


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.




回答5:


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



回答6:


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



来源:https://stackoverflow.com/questions/34048228/tfs-build-error-after-installing-visual-studio-2015-update-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!