Search code examples
visual-studiovisual-studio-2013typescriptecmascript-6systemjs

SystemJS modules with Visual Studio 2013 and TypeScript


I'm trying to use SystemJS modules in Visual Studio 2013 with TypeScript, but Visual Studio shows errors.

This is my setup:

  • Installed TypeScript Tools for Microsoft Visual Studio 2013 1.8.5.0
  • Uninstalled lower versions of TypeScript
  • Project file (VS 2013 does not support tsconfig.json):

    <TypeScriptToolsVersion>1.8</TypeScriptToolsVersion> <TypeScriptModuleKind >system</TypeScriptModuleKind> <TypeScriptTarget>es5</TypeScriptTarget>

This is what I see:

  • My project compiles successfully
  • In the browser, AngularJs runs successfully
  • But in Visual Studio, I see squiggly lines. Upon hovering it says 'expression statement is not assignment or call':

enter image description here

This issue is related to this question, however, the answer there is 'use VS 2015', which simply is not an option for me.

Is there any way to use SystemJS with TypeScript in Visual Studio 2013? It doesn't have to be ES6-style modules, just any combination of SystemJS and TypeScript will do. Thanks!


Solution

  • It seems that there just isn't a solution for this. Upgrading to VS2015 is the only way to fix it.