TypeScript 1.8 for Visual Studio 2017

后端 未结 2 1029
执笔经年
执笔经年 2021-02-07 10:13

I have a project created in Visual Studio 2015 which using TypeScript 1.8. After installing Visual Studio 2017, I tried to open the old project in the new IDE. If I check proper

相关标签:
2条回答
  • 2021-02-07 10:49

    Installing the version at enter link description here worked for me.

    0 讨论(0)
  • 2021-02-07 10:52

    I was able to solve this problem by installing the corresponding version nuget package of Microsoft.TypeScript.MsBuild. So for us it is version 1.8.11.

    The TypesScript version still says 'unavailable' and there are still some intellisense errors shown. However, the project builds and runs properly.

    Alternatively, if a user wants a higher version. Microsoft makes some version tooling available as a visual studio extension (e.g. version 2.7 https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.typescript-27-vs2017)

    UPDATE: I have figured out the intellisense errors. You can go to Tools > Extensions and Updates and install typescript tools for a version greater than 2.6. Then you can you the //@ts-ignore suppression comments described here

    Side note: I did not have any luck resolving the intellisense errors. I tried

    • Installing the Microsoft.TypeScript.Compiler nuget package for 1.8
    • Installing various versions of the TSLint nuget package
    • Installing the TSLint.MSBuild nuget package
    • Installing the TypeScript Analyzer (a static analysis extension for TSLint)
    0 讨论(0)
提交回复
热议问题