I was formerly using Visual Studio 2013 for a web TypeScript project. Upgraded to Visual Studio 2015 Update 3, and when building the project, I get
"tsc.exe" exited with code 1
There are a million of these errors on the web. One suggested I install Microsoft.TypeScript.MSBuild and Microsoft.TypeScript.Compiler via NPM, which I did.
When I dig into the Output (making it verbose), I see this:
1> C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.6\tsc.exe --project "F:\depot\depot\code\main\web\CedarsReport\tsconfig.json" --listEmittedFiles
1> F:\depot\depot\code\main\web\CedarsReport\error TS5023:Build:Unknown compiler option 'listemittedfiles'.
Questions: 1) Why is it using TypeScript 1.6? I installed "TypeScript 1.8.4 for Visual Studio 2015."
2) Where is the --listEmittedFiles option coming from, and how can I disable it?
3) If I go to Project > Properties > TypeScript Build, it says: ":One or more tsconfig.json files detected. Project properties are disabled." So I tried moving my tsconfig.json file to the desktop, deleting the one in the project folder. Quit Visual Studio 2015 and restarted, did clean and rebuild, and same error message. Why does it think there is still a tsconfig.json file when there isn't one?!
Even if you can't answer all questions, answering any would be welcome, esp. #2.
You can probably fix this issue by installing TypeScript 2.1.5 using the following link:
This will also point MSBuild to the proper TypeScript build, which fully supports the --listEmittedFiles
command switch (not supported in 1.x, hence the error).
See also this answer and/or this article that I wrote on the topic for further details and references about this issue.
I am using visual studio 2013. In my case in Web.csproj file, I replaced
by
I do not get this error now anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With