簡體   English   中英

VSO ASP.NET5 CI構建期間出錯 - “您的項目使用不同版本的TypeScript編譯器”但我沒有使用TypeScript

[英]Error during VSO ASP.NET5 CI build - “Your project uses a different version of the TypeScript compiler” but I'm not using TypeScript

突然從昨天(2015年8月31日)開始運行持續集成構建時,我的Visual Studio Online構建服務器出現錯誤。 使用以下文本在我的DNX項目(Build Foo.Api.xproj)的構建步驟期間發生錯誤:

錯誤:您的項目文件使用的TypeScript編譯器和工具版本與此計算機上當前安裝的版本不同。 在C:\\ Program Files(x86)\\ Microsoft SDKs \\ TypeScript \\ 1.4 \\ 1.4 \\ tsc.exe中找不到編譯器。 您可以通過更改項目文件中的元素來解決此問題。

問題是,我根本沒有在項目中使用TypeScript ,而且查找就沒有了。 我與同事們進行了核實,看來他們在持續集成構建中遇到了類似的錯誤,包括一個根本沒有變化的項目。

這讓我相信這是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

在MSDN上發布了一個解決方法(鏈接如下)。 它對我有用! 基本上,您將以下內容添加到構建定義的MSBuild Arguments部分:

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

所以現在我的構建定義如下所示:

“Visual Studio Build”步驟的構建定義的“構建”選項卡

我還在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-控制器由於對打字稿?論壇= TFService

我們現在正在推出VSO構建映像的更新。

問題是由於VS安裝和TS更新的順序。 這是根本問題: https//github.com/Microsoft/TypeScript/issues/3493#issuecomment-136722977

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM