1

I am getting build errors for multiple *.ts files. TypeScript compiler says

Unknown extension for file: "<filenameandpath>.ts". Only .ts and .d.ts extensions are allowed.

These files build alright on save. Web Essentials never complains about anything and this is the only message I am getting in the output window. I am using VS 2012

1
  • Have you recently upgraded your version of TypeScript? Commented Feb 4, 2013 at 9:29

1 Answer 1

1

Sometimes you get an error message like this when you upgrade from a pre 0.8.2.0 version of TypeScript. The error is in your project file, which is pointing at the wrong location for the compiler. For example, it is looking for:

c:\Program Files\Microsoft SDKs\TypeScript\0.8.1.1\tsc

But the compiler is now located in:

c:\Program Files\Microsoft SDKs\TypeScript\tsc

You can edit your project file to fix this error.

In your scenario, as you are using Web Essentials to compile on save and have all your checking at this point, you could switch off compilation on build entirely. Just remove that section from the project file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.