最佳答案
升级到 VisualStudio2015后,“保存时编译”功能对我不起作用。当我更改项目中的 .ts文件并保存时,IDE 底部的状态栏显示 Output(s) generated successfully,但生成的 .js文件不变。
以下是我试过的方法:
将以下内容添加到 .csproj中的根 <Project>元素:
<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.