[英]Typescript not compiling on save or publish in Visual Studio 2017
It seems not matter what I do, I cannot get my .ts files to compile into .js files. 似乎没关系,我无法将.ts文件编译成.js文件。 I have uninstalled and reinstalled Visual Studio 2017 Community and I now have
VS 2017 15.2 (26430.15)
and Typescript 2.2.2.0
(according to the About
window inside VS). 我已经卸载并重新安装了Visual Studio 2017社区,现在拥有
VS 2017 15.2 (26430.15)
和Typescript 2.2.2.0
(根据VS中的About
窗口)。
Steps I am taking: 我正在采取的步骤:
ts1.ts
ts1.ts
的新ts文件。 ts1.ts
and add single line (eg var a = 1
) ts1.ts
并添加单行(例如var a = 1
) I've tried it with/without tsconfig.json
and I have tried adding compileOnSave
to tsconfig
when I have added it. 我已经尝试过使用
tsconfig.json
或不使用tsconfig.json
并且在添加tsconfig
时尝试将compileOnSave
添加到tsconfig
。
Help? 救命?
edit: There are no build errors or warnings and I get a message in the footer saying Output(s) generated successfully
. 编辑:没有构建错误或警告,并且我在页脚中收到一条消息,指出
Output(s) generated successfully
。
Do you not just need to select "Show All Files" in the Solution Explorer. 您不仅需要在解决方案资源管理器中选择“显示所有文件”。 I have just followed your exact steps, and when showing all files, I can see the JS file, its just not automaticly added to the project.
我已经按照您的确切步骤操作了,在显示所有文件时,我可以看到JS文件,但该文件并未自动添加到项目中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.