Visual Studio Update 3 and TypeScript external module compilation

7. August 2014 08:54 by Cameron in TypeScript  //  Tags: , , , , , , , ,   //   Comments

I recently updated to Visual Studio 2013 Update 3, but it appears as though the TypeScript compiler is a little more strict in external module compilation. If you receive an error message asking the --module flag to be set, you need to add this to your build configurations in your project:

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <TypeScriptModuleKind>amd</TypeScriptModuleKind>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <TypeScriptModuleKind>amd</TypeScriptModuleKind>
  </PropertyGroup>

After adding the TypeScriptModule kind node to the project properties, the compiler can correctly compile external TypeScript modules!

Month List

Tag cloud