TypeScript“保存时编译"功能在 Visual Studio 2015 中不起作用 [英] TypeScript "Compile on save" feature not working in Visual Studio 2015

查看:45
本文介绍了TypeScript“保存时编译"功能在 Visual Studio 2015 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

升级到 Visual Studio 2015 后,保存时编译"功能对我不起作用.当我更改项目中的 .ts 文件并保存时,状态栏位于IDE 底部显示 Output(s) generated successfully,但生成的 .js 文件没有改变.

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.

这是我尝试过的:

  • 将以下内容添加到我的 .csproj 中的根 元素:

<PropertyGroup>
    <TypeScriptCompileOnSaveEnabled>True</TypeScriptCompileOnSaveEnabled>
</PropertyGroup>

  • 选中和取消选中工具中的自动编译不属于项目一部分的 TypeScript 文件"选项 ->选项 ->打字稿 ->项目:

    仔细检查以确保在我的项目的 TypeScript 构建属性中选中了保存时编译":

    double checking to make sure "Compile on save" is checked in my project's TypeScript Build properties:

    我错过了什么?

    作为旁注,TypeScript 编译步骤在由常规构建触发时确实按预期工作.

    As a side note, the TypeScript compilation step does work as expected when triggered by a regular build.

    推荐答案

    这个问题似乎已经通过 TypeScript Language Services 扩展的最新更新得到解决.

    This issue seems to have been resolved with the most recent update to the TypeScript Language Services extension.

    有关如何应用此更新的说明,请参阅此答案.

    这篇关于TypeScript“保存时编译"功能在 Visual Studio 2015 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆