最佳答案
升级到 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.