Scenario
Every now and then, I find myself wanting to rebuild or recompile all TypeScript files in a typical VS 2017 .NET framework C# project (.csproj) without generating the dlls, and so on. I would greatly appreciate a simple console command solution for this.
Steps Taken So Far:
I have managed to compile everything using MSBuild: c:\>msbuild.exe my.csproj
. In addition, I have discovered that the installed nuget package
Microsoft.TypeScript.MSBuild.2.7.2
is embedded in my .csproj and has a CompileTypeScript target defined. However, when I execute c:\>msbuild.exe my.csproj -t:CompileTypeScript
, I get a result of 0 Errors, 0 Warnings, and no action is taken. It seems like the compiler is looking for the ts files in the wrong location or not finding any. (It is worth noting that an error message is displayed when referencing a non-existing target, confirming that the target is present.)
Query
Despite my attempts with MSBuild, I am keen on compiling all TypeScript files within the .csproj project and applying the same TypeScript compiler settings established there. How can I achieve this objective effectively?