简体   繁体   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

Suddenly from yesterday (31 August 2015) I have been getting an error on my Visual Studio Online build server when running the continuous integration build. 突然从昨天(2015年8月31日)开始运行持续集成构建时,我的Visual Studio Online构建服务器出现错误。 The error occurs during the Build step for my DNX project (Build Foo.Api.xproj) with the following text: 使用以下文本在我的DNX项目(Build Foo.Api.xproj)的构建步骤期间发生错误:

Error : Your project file uses a different version of the TypeScript compiler and tools than is currently installed on this machine. 错误:您的项目文件使用的TypeScript编译器和工具版本与此计算机上当前安装的版本不同。 No compiler was found at C:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\1.4\\1.4\\tsc.exe. 在C:\\ Program Files(x86)\\ Microsoft SDKs \\ TypeScript \\ 1.4 \\ 1.4 \\ tsc.exe中找不到编译器。 You may be able to fix this problem by changing the element in your project file. 您可以通过更改项目文件中的元素来解决此问题。

The thing is, I'm not using TypeScript in the project at all and a Find on that turns up nothing. 问题是,我根本没有在项目中使用TypeScript ,而且查找就没有了。 I checked with my colleagues and it seems that they are getting similar errors on their continuous integration builds, including on a project that has had no changes at all. 我与同事们进行了核实,看来他们在持续集成构建中遇到了类似的错误,包括一个根本没有变化的项目。

This leads me to believe it is a problem with VSO's build server, perhaps an upgrade. 这让我相信这是VSO构建服务器的问题,也许是升级。 Does anyone know what is going on here and how to fix it? 有谁知道这里发生了什么以及如何解决它?

To provide some context, this is the full output on the build console for this step: 要提供一些上下文,这是此步骤的构建控制台上的完整输出:

    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

There is a workaround for this posted on MSDN (link below). 在MSDN上发布了一个解决方法(链接如下)。 It worked for me! 它对我有用! Basically, you add the following to the MSBuild Arguments section of your build definition: 基本上,您将以下内容添加到构建定义的MSBuild Arguments部分:

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

so now my build definition looks like this: 所以现在我的构建定义如下所示:

“Visual Studio Build”步骤的构建定义的“构建”选项卡

I also opened a new issue on GitHub, but I got a response that it is not an issue with TypeScript but rather an issue with Visual Studio Online, and that the VSO team is aware and working on a fix. 我还在GitHub上打开了一个新问题,但我得到的回答是,它不是TypeScript的问题,而是Visual Studio Online的问题,而且VSO团队知道并正在修复。 Hope this helps! 希望这可以帮助!

Reference as promised: 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 参考承诺: https//social.msdn.microsoft.com/Forums/en-US/c6443c18-23d7-4bd2-a0f9-1fa558f18d22/typescript-build-failing-for-visual-studio-online-hosted-build-控制器由于对打字稿?论坛= TFService

We are rolling out an update to the VSO build images now. 我们现在正在推出VSO构建映像的更新。

The issue was due to the order of VS installs and TS updates. 问题是由于VS安装和TS更新的顺序。 Here's the root issue: https://github.com/Microsoft/TypeScript/issues/3493#issuecomment-136722977 这是根本问题: https//github.com/Microsoft/TypeScript/issues/3493#issuecomment-136722977

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将TypeScript部署到Azure-您的项目文件使用不同版本的TypeScript编译器 - Deploying TypeScript to Azure - Your project file uses a different version of the TypeScript compiler 在VSO / Azure上构建时出错-找不到Typescript编译器 - Error building on VSO / Azure - Typescript compiler not found Typescript版本3中出现编译器错误,但版本2中没有 - Compiler error in Typescript version 3 but not in version 2 带VSO CI的Asp.Net Core 2.0-tsc 2.6.2错误 - Asp.Net Core 2.0 with VSO CI - tsc 2.6.2 error ASP.NET 5 项目中的 TypeScript 工具版本设置在哪里? - Where is the TypeScript Tools version set in an ASP.NET 5 Project? Intellisense不使用项目打字稿版本 - Intellisense not using project typescript version 如何找到我通过CLI使用的打字稿版本? - How to find the typescript version that I'm using through CLI? 如何确保Visual Studio在构建期间使用哪种TypeScript编译器? - How to ensure exactly which TypeScript compiler Visual Studio is using during build? 如何将Typescript实施到ASP.NET MVC 3项目中? - How I can implement Typescript into ASP.NET MVC 3 project? 在构建过程中反应,redux和打字稿错误 - react, redux and typescript error during build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM