简体   繁体   中英

VS2015 Typescript compile to single file on save not working

I have trouble with VS 2015 and Typescript compile on save. If I enable combine all outputs into one file that output file will not be updated on save. During build the file gets updated correctly. Some times there is an error message in the status bar which states the .map file can't be written. If i disable the one file option compile on save is working.

Is there any option to enable some logging so I could figure out what is going wrong?

Update: I was able to reproduce this with a new clean Project and also on another PC of a collegue with a completeely different existing project. So this seems to be a general bug.

Yes, I reproduced this too

You need to set full path for JavaScript file

This has been fixed.

Go to Extensions and Updates . Update to version 1.5.4 or above and it should work.

The upgrade process is a little odd because a new Visual Studio installer will appear on top of the current instance. Close the Visual Studio underneath and then continue with the update to avoid conflicts.

It took quite a surprising length of time (over a minute) to apply the update but it works fine now.

Note: When making a .ts file to then save change you must make a real code change, not just type something, delete it and save or it won't be recognized.

在此处输入图片说明

Full path is fine until you have to start building on different machines.

I for instance use R:\\TFS-PROJECTS on my local machine but C:\\TFS-PROJECTS on the TFS server (which also builds the typescript).

As a temporary solution I'm using junction.exe to make symbolic link (run as admin).

junction c:\TFS-PROJECTS r:\TFS-PROJECTS

That way I can just use the same full path. If you have vastly different hierarchies you could use C:\\PROJECT1-ROOT and point that wherever you need.

在此处输入图片说明

Junction is a sysinternals program available for Microsoft : https://technet.microsoft.com/en-us/sysinternals/bb896768

Hoping a fix for this regression bug will be deployed soon.

It's an old question, but I had a different resolution:

Make sure your TypeScript version is installed/available. I'd opened an old project and it was set as 3.6 (unavailable) . Updating the version to 3.8 (which was installed) fixed it.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM