TypeScriptOutFile won't work if relative path is specified

Topics: General
Sep 11, 2013 at 2:05 PM
Edited Sep 11, 2013 at 2:21 PM
I'm having an issue where typescript won't compile to a single file if no path is specified.

Here are my settings:
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />
This setting won't generate Test.js anywhere. Tried "Scripts\Test.js" as well, no luck.
If I change it to C:\Test.js, it works fine. If I remove the TypeScriptOutFile property, it will compile fine as well to single files.

I monitored with Procmon, and it seems that it is not the case of the file is being generated somewhere else, like the VS folder or System32. It seems that without an absolute path, the file is just not generated at all.

Is this a bug or I am missing something? Do we need to specify the path using variables for this?

Note: I'm using with VS 2012.

Edit: Just noted that If I specify the filename only, no file is generated anywhere, but if I specify a relative path like "Scripts\Test.js", the file is generated under "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Scripts\Test.js".

Sep 11, 2013 at 2:46 PM
I found a workaround using
Still I wonder if this is the recommended way, as every example out there is just specifying the file name.
Oct 9, 2013 at 1:15 PM
  <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
This works well.
Oct 9, 2013 at 2:16 PM
If the path is a single file it works, if you add a folder to the path it saves to the wrong place.