codetoshare codetoshare - 1 month ago 5x
TypeScript Question

Type Script is not generating JavaScript in my Visual Studio Community edition 2015

I am using Visual Studio Community edition 2015 for development, I have added *.ts file to my project but its not automatically compiling. Also it does not show JavaScript preview pane. This post How do I enable the preview panel for TypeScript files in Visual Studio 2015? says that it's not supported anymore. That's fine, but why it's not compiling?

I referenced Missing Typescript Options in Web Essential for Visual Studio 2012

It says Split panes have been reintroduced in the latest version of web essentials but I can not see it

I do have typescript exe in following folder

C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.5

I do have settings in Project Properties as follow

enter image description here

I do have settings as follow in Visual Studio

enter image description here

I see comment in as below

"Visual Studio includes TypeScript in the box, starting with Visual Studio 2013 Update 2. You can also edit TypeScript in VS Code, WebStorm, Atom, Sublime Text, and Eclipse"

What may be issue?


My "typings" file for jquery was out dated, I upgraded it and it resolved other erros and build was success, then JS files got genearted

Below post helped
JQuery definition screwed up with TypeScript 0.9

I can not close this question because I am still not able to get 'Preview Pane"


I regularly encounter this issue in VS 2015 and VS 2013. My solution is not a pretty one, but it works for me...

  1. Close Visual Studio
  2. Go to your scripts folder, delete all JavaScript files that have corresponding TypeScript files (only necessary to do this for TypeScript files that you have created for your project)
  3. Open Visual Studio, clean, and build

If this doesn't work, open each TypeScript file, change one character, Save, re-build... hopefully the file will re-compile.

If this still doesn't work, open a Node.JS command prompt, change directory to the scripts directory, run;

tsc "yourfile.ts"

If this doesn't work, you've got bigger problems.