I need to know how to disable compile on save for typescript files?
Asked
Active
Viewed 5,166 times
11
-
1to disable it just upgrade to RTM because they broke it :-/ https://connect.microsoft.com/VisualStudio/feedback/details/1581065/typescript-compile-output-into-single-file-not-working-on-save ;-) – Simon_Weaver Aug 01 '15 at 18:04
2 Answers
22
Typescript compilation is enabled by default. You can do next to disable it:
- Select and click 'Unload Project' menu item.
- Select unloaded project and click 'Edit .kproj'.
- Add new 'PropertyGroup' node to projects root node:
<?xml version="1.0" encoding="utf-8"?>
<Project ...>
...
<PropertyGroup>
<TypeScriptCompileOnSaveEnabled>False</TypeScriptCompileOnSaveEnabled>
</PropertyGroup>
</Project>

Vyacheslav Borisov
- 268
- 2
- 9
-
Is their a way to compile the script on save but not save the .js file ? – RPDeshaies Apr 10 '15 at 23:33
-
1In 3rd point should be "add new 'PropertyGroup'" not "ProjectGroup". I wanted to edit it, but StackOverflow doesn't allow to make such small changes – Piotrek Aug 16 '16 at 08:52
6
For loose files (outside of a project)
Tools -> Options
- Text Editor
- TypeScript
- Project
- TypeScript
[ ]
Automatically compile TypeScript files which are not part of a project
For projects
Right-click the project -> Properties
Select the "TypeScript Build" tab (on the left)
Uncheck "Compile on save" under the "General" heading

Ryan Cavanaugh
- 209,514
- 56
- 272
- 235
-
4To be clear there is no Typescript Build tab for Asp.net 5 projects. – Elizabeth Schneider Feb 24 '15 at 21:01
-
2For the new VS2015 when using ASP.Net 5 projects, this setting can be found on the `Build` tab as `Compile TypeScript on build`. – Matt DeKrey Aug 31 '15 at 13:07
-
Compile typescript on build doesn not prevent js fiels to be created on save. It seems that TypeScriptCompileOnSaveEnabled still doens't work on ASP.NET 5 projects – nemenos Sep 03 '15 at 09:43
-
More details about "Compile on save" in ASP.NET 5 projects can be found in this article: https://github.com/Microsoft/TypeScript/wiki/Using-TypeScript-With-ASP.NET-5#user-content-compile-on-save – marianc Dec 14 '15 at 16:32