We have a .NET MVC project with a TypeScript front-end, using tsc to compile files during build. After investigation, it appears that nearly half of our build time is occuring due to the CompileTypeScriptWithTSConfig target, task VsTsc.
Expected behavior:
If no typescript files have been updated, VsTsc should not be run, since there is no need to recompile all the changed files.
Stretch expected behavior:
If I update a TypeScript file and build, only that file should be recompiled, since no other files have changed (similar to the behavior of tsc --watch. After doing some searching, I think this might not be possible, but it's worth a shot.
Actual behavior:
On build, VsTsc is always called and all TypeScript files are recompiled, regardless of whether or not any of them have changed since last build.
Search Terms:
msbuild, vstsc, incremental build, incremental compile, compile on build, visual studio
We have a .NET MVC project with a TypeScript front-end, using
tscto compile files during build. After investigation, it appears that nearly half of our build time is occuring due to theCompileTypeScriptWithTSConfigtarget, taskVsTsc.Expected behavior:
If no typescript files have been updated,
VsTscshould not be run, since there is no need to recompile all the changed files.Stretch expected behavior:
If I update a TypeScript file and build, only that file should be recompiled, since no other files have changed (similar to the behavior of
tsc --watch. After doing some searching, I think this might not be possible, but it's worth a shot.Actual behavior:
On build,
VsTscis always called and all TypeScript files are recompiled, regardless of whether or not any of them have changed since last build.Search Terms:
msbuild, vstsc, incremental build, incremental compile, compile on build, visual studio