Nikos
Nikos

Reputation: 7551

VS 2012 web express doesn't compile typescript files on existing ASP MVC projects

So I've set up VS 2012 web express to compile typescript by installing the microsoft 0.8.2 extension, but nothing happens on save, ie not .js files or source map file generated.

  <Target Name="BeforeBuild">
<Exec Command="&quot;$(PROGRAMFILES)\Microsoft SDKs\TypeScript\tsc&quot; -module amd -target ES5 @(TypeScriptCompile ->'&quot;%(fullpath)&quot;', ' ')" IgnoreExitCode="true" />

Any ideas?

Upvotes: 0

Views: 388

Answers (1)

Fenton
Fenton

Reputation: 251012

Can you run the command manually with command prompt - this is the best way of testing the command...

"c:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc" --module amd --target ES5 YourFile.ts

(note the flags are normally double dashed)

You should discover one of the following...

  • The TypeScript compiler is in a different location to the one you are using
  • There is a compiler error that is stopping the JavaScript files from being generated

Upvotes: 2

Related Questions