11

突然从昨天(2015年8月31日)我的Visual Studio Online在运行持续集成构建时构建服务器。比目前你的项目文件中使用了不同版本的打字稿编译器和工具:VSO ASP.NET5 CI编译期间出错 - “您的项目使用不同版本的TypeScript编译器”但我没有使用TypeScript

错误:在我的DNX项目(建设Foo.Api.xproj)与下面的文本生成步骤中发生错误安装在这台机器上。在C:\ Program Files(x86)\ Microsoft SDKs \ TypeScript \ 1.4 \ 1.4 \ tsc.exe中找不到编译器。您可以通过更改项目文件中的元素来解决此问题。

的事情是,我没有使用打字稿在所有的项目和查找上变成了什么。我检查了我的同事,似乎他们在持续集成构建方面出现了类似的错误,包括一个根本没有任何变化的项目。

这使我相信这是VSO构建服务器的问题,也许是升级。有谁知道这里发生了什么,以及如何解决它?

提供一些背景,这是构建控制台上的全输出此步骤:

Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\tasks\VSBuild\1.0.13\VSBuild.ps1 
C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe "C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj" /nologo /m /nr:false /fl /flp:"logfile=C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj.log" /dl:CentralLogger,"C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll"*ForwardingLogger,"C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agent\worker\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /t:Build,FileSystemPublish /p:PublishConfiguration=Release /p:PublishOutputPathNoTrailingSlash=C:\a\12345678\staging/Foo.Api /p:platform="any cpu" /p:configuration="Release" /p:VisualStudioVersion="14.0" 
Build started 9/1/2015 6:36:28 AM. 
The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.Net.CoreRuntime.targets (68,11)" does not exist in the project, and will be ignored. 
The target "_GeneratePrisForPortableLibraries" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.Net.CoreRuntime.targets (177,11)" does not exist in the project, and will be ignored. 
The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (126,11)" does not exist in the project, and will be ignored. 
The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (174,11)" does not exist in the project, and will be ignored. 
The target "BeforeGenerateProjectPriFile" listed in a BeforeTargets attribute at "C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets (149,61)" does not exist in the project, and will be ignored. 
    1>Project "C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj" on node 1 (Build;FileSystemPublish target(s)). 
    1>PrepareForBuild: 
     Creating directory "..\artifacts\bin\Foo.Api\". 
     Creating directory "..\artifacts\obj\Foo.Api\any cpu\Release\". 
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(103,5): Error : Your project file uses a different version of the TypeScript compiler and tools than is currently installed on this machine. No compiler was found at C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\1.4\tsc.exe. You may be able to fix this problem by changing the <TypeScriptToolsVersion> element in your project file. 
    1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(103,5): error : Your project file uses a different version of the TypeScript compiler and tools than is currently installed on this machine. No compiler was found at C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\1.4\tsc.exe. You may be able to fix this problem by changing the <TypeScriptToolsVersion> element in your project file. [C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj] 
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(103,5): Error MSB6004: The specified task executable location "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\1.4\tsc.exe" is invalid. 
    1>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(103,5): error MSB6004: The specified task executable location "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\1.4\tsc.exe" is invalid. [C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj] 
    1>Done Building Project "C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj" (Build;FileSystemPublish target(s)) -- FAILED. 
Build FAILED. 
     "C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj" (Build;FileSystemPublish target) (1) -> 
     (PreComputeCompileTypeScript target) -> 
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(103,5): error : Your project file uses a different version of the TypeScript compiler and tools than is currently installed on this machine. No compiler was found at C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\1.4\tsc.exe. You may be able to fix this problem by changing the <TypeScriptToolsVersion> element in your project file. [C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj] 
     C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\TypeScript\Microsoft.TypeScript.targets(103,5): error MSB6004: The specified task executable location "C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\1.4\tsc.exe" is invalid. [C:\a\12345678\Root\src\Foo.Api\Foo.Api.xproj] 
    0 Warning(s) 
    2 Error(s) 
Time Elapsed 00:00:01.81 
+2

也有这个Github上的问题的报告,它说,它是封闭的,但今天有人评论说,他们是匹配的这些症状:https://github.com/Microsoft/TypeScript/issues/3493 – Ivan

+2

对此造成的不便,我们深表歉意。我们部署了一个映像更新,解决了另一个问题,同时还原了我们为解决此类问题而采取的破解措施。我们准备好了一张新图片,并将很快开始推出。 –

回答

4

有张贴在MSDN(下面的链接)解决类似的问题。它为我工作!基本上,你下面的添加到您的构建定义的MSBuild的参数部分:

/p:TscToolExe="..\tsc.exe" 

所以现在我的构建定义是这样的:

"Build" tab of build definition for "Visual Studio Build" step

我也开了一个新的问题在GitHub上,但我得到了一个回应:它不是TypeScript的问题,而是Visual Studio Online的一个问题,VSO团队知道并正在进行修复。希望这可以帮助!

参考的承诺:https://social.msdn.microsoft.com/Forums/en-US/c6443c18-23d7-4bd2-a0f9-1fa558f18d22/typescript-build-failing-for-visual-studio-online-hosted-build-controller-due-to-typescript?forum=TFService

+0

谢谢@ koppinjo ... VSO团队太快了,我没有机会测试这个(正在睡觉...... UTC + 2在这里),但+1! – Ivan