Reputation: 1857
I have VS 2013 Update 4 and I am trying out TS for the first time.
I can't the compiler to do its job, I get a 'Command "tsc" is not valid' error in the Command Window.
I have verified that I did have the correct PATH entry and that it pointed to the correct location for tsc.exe. I have tried closing/opening the command window and restarting VS as others have suggested.
Automatic TS compiling is also not working. I have tried excluding and re-adding the .ts file and turning on compile module not part of project.
Any ideas what else I can try?
Edit: Automatic compilation is actually working. I was assuming that the resulting js file would show up in the project tree so I could add it to my html. It does not. The .js file is created, even if you see no evidence within VS. If you drag the .ts file into your code window, it actually adds the .js file.
Upvotes: 1
Views: 1862
Reputation: 251292
There are a few interesting points to note...
Check your PATH... I know you already did this, because you mention it in your question, but really double check it. Manually browser to c:\Program Files (x86)\Microsoft SDKs\TypeScript\
and see what your most recent version is. Then check that your PATH variable points to that folder. You sometimes have to restart to get the PATH variable refreshed everywhere it gets used.
Don't expect to find JavaScript files in Visual Studio. This has been the case since v0.9.5. They are like DLLs - you don't browse them, edit them, or check them into version control.
Still a problem? Open a command prompt (in the solution context) and try tsc -v
. This not only checks your PATH is right, it will tell you which version it is pointing to. Maybe you still have the old path to tsc as well as the new one in your PATH variable.
Upvotes: 2