Visual Studio Team Services build Typescript error -


i have angular2 webapplication i'm using typescript 2.0. have install locally in vs version 2.0 , changed tag typescript version in vs project. locally vs build works fine. in cd pipeline on visual studio team services vnext build build fails this:

2016-11-05t16:10:22.0371090z   c:\program files (x86)\microsoft sdks\typescript\1.8\tsc.exe --project "c:\a\1\s\src\emersy\tsconfig.json" 2016-11-05t16:10:22.7095466z ##[error]vstsc(0,0): error ts5023: build: unknown compiler option 'strictnullchecks'. 

looks build server using typesript version 1.8 possible?

typescript 2.0 not available in hosted build agent. use microsoft.typescript.msbuild package instead, after build project on hosted agent typescript 2.0.

  1. add/install microsoft.typescript.msbuild package project
  2. edit project file (.csproj)

    a.) configure msbuild use nuget package's props file.

    <import project="..\packages\microsoft.typescript.msbuild.2.0.6\build\microsoft.typescript.msbuild.props" condition="exists('..\packages\microsoft.typescript.msbuild.2.0.3\build\microsoft.typescript.msbuild.props')" /> <!--<import project="$(msbuildextensionspath32)\microsoft\visualstudio\v$(visualstudioversion)\typescript\microsoft.typescript.default.props" condition="exists('$(msbuildextensionspath32)\microsoft\visualstudio\v$(visualstudioversion)\typescript\microsoft.typescript.default.props')" />--> 

    b.) configure msbuild use nuget package's targets file.

    <import project="..\packages\microsoft.typescript.msbuild.2.0.6\build\microsoft.typescript.msbuild.targets" condition="exists('..\packages\microsoft.typescript.msbuild.2.0.6\build\microsoft.typescript.msbuild.targets')" /> <!--<import project="$(msbuildextensionspath32)\microsoft\visualstudio\v$(visualstudioversion)\typescript\microsoft.typescript.targets" condition="exists('$(msbuildextensionspath32)\microsoft\visualstudio\v$(visualstudioversion)\typescript\microsoft.typescript.targets')" />--> 

    if .net core project, add code section of .xproj file

    <typescripttoolsversion>2.0.6</typescripttoolsversion> <tsctoolpath>c:\users\[user account]\.nuget\packages\microsoft.typescript.msbuild\2.0.6\tools\tsc</tsctoolpath> 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -