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

前端 未结 6 1200
小蘑菇
小蘑菇 2020-12-10 13:39

I am using Visual Studio Community edition 2015 for development, I have added *.ts file to my project but its not automatically compiling.

6条回答
  •  生来不讨喜
    2020-12-10 14:04

    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.

提交回复
热议问题