File not found errors when compiling large projects
description
When compiling a large project error messages under Visual Studio 2012 on Windows 8 are generated stating that files cannot be found. The error messages contain incorrect paths to the files. The paths that are displayed in the error messages are missing a single character.
The error messages are one of the following:
Error reading file "<< file name >> ": File not found
Unknown extension for file: "<< file name >>". Only .ts and .d.ts extensions are allowed.
I have traced this back through the compiler source code and tracked it down to a problem with the WScript host library. It looks like this library is passing a corrupted command line to the script from the WScript.Arguments property. It looks like a single character is being removed from the command line every 8192 characters. This suggests some kind of buffer bug in the WScript library. I am using version 5.8.9200.16384 of the windows script host runtime library.
To reproduce this create a set of Typescript classes, one in each file and then place them down a deep folder structure with long file names. This will generate a long command line that will then show the problem.