I downloaded and installed TypeScript extension for VS 2012, I got my first sample compiles by manually dragging the ts file onto the tsc.exe file! because no other way to compile the file will work.
I don't want to manually do this everytime I want to debug a page! I have read about 5 articles on the web and none of the solutions work. I've tried adding TypeScript compiler to PATH in Windows, I've tried downloading and installing via Nuget Package Manager the Sholo thing, I've tried these pages:
- Using TypeScript in cshtml files
- Visual Studio TypeScript Options
- Debugging TypeScript code with Visual Studio
- Cannot compile typescript using tsc node module
- TypeScript - Visual Studio - d3
- Visual Studio 2012 TypeScript project ignoring two files during compile
- TypeScript / Visual Studio 2012 / Compilation parameters
- Using TypeScript in an existing Visual Studio Web Site project
- Visual Studio TypeScript Options
- Compile generated files in Visual Studio
And not a single solution has worked.
I have even downloaded and installed the Web Essentials plugin for Visual Studio and gone to Options menu, then selected "Compile all TypeScript files on Build = True" and "Compile TypeScript on Save = True" - but nothing works.
I've read the entire TypeScript website, the specification, and even their discussion tab on the codeplex site.
How can I get TypeScript to compile when I save changes to the .ts
file or when I press F5/Debug/Build?
*I don't really want any third-party scripts/plugins, etc unless it's absolutely necessary. I've seen a couple of them and it's just ... there's no point. I might as well just write pure JavaScript.
Please check if you have invalid TypeScript. There are some TypeScript errors that don't show up in the Error List, but they prevent TypeScript Compile-On-Save and show a
Output generation failed
message in the Visual Studio status bar.These are the TypeScript errors that can cause this:
export
ing a class which is not inside of a module (v 0.9.5).Please let me know if there are more such errors, I'll add them here.