The "Compile on save" feature isn't working for me after upgrading to Visual Studio 2015. When I make a change to a .ts
file in my project and save, the status bar at the bottom of the IDE says Output(s) generated successfully
, but the generated .js
file doesn't change.
Here's what I've tried:
adding the following to the root
<Project>
element in my.csproj
:<PropertyGroup> <TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled> </PropertyGroup>
checking and unchecking the "Automatically compile TypeScript files which are not part of a project" option in
Tools -> Options -> TypeScript -> Project
:double checking to make sure "Compile on save" is checked in my project's TypeScript Build properties:
What am I missing?
As a side note, the TypeScript compilation step does work as expected when triggered by a regular build.
In project properties -> "TypeScript Build", you can also simply just uncheck "Do not emit outputs if any errors are reported." Having it checked seems to deactivate transpiling on save, where there is an error or not.
locate the file i.e. C:\file.ts in your
terminal/cmd
and typeExact same problem here. I am using Visual Studio 2015 update 3 and TypeScript 2.9.2.0. In tools/options/projects and solutions/external web tools, I upgraded $(PATH) to the second position. With all these configurations, compileOnSave: true doesn't work for me. The workaround solution is open a command line, run
ng build --watch
on the side and let node take care of auto compilationIn my case, I had installed Visual Studio Community 2015 along side VS 2012. I had been using Web Essentials for typescript in 2012 which appeared to conflict with 2015.
Uninstalling Web Essentials in 2012 fixed the issue for me.