I'm running a Asp.Net Core RC2, project.json project and have setup gulp to watch and compile my typescript to a different location. But Visual Studio 2015 is also compiling the typescript each time I compile, giving me duplicates of each js file. How do I stop VS from compiling my typescript files.
I have disabled compile on save in my tsconfig.json
, but there seams to be no options for disabled it on build.
{
"compileOnSave": false
}
Currently, there are a few ways to "disable TypeScript" in VS. You could go to Tools > Options > Text Editor > JavaScript/TypeScript > Project and uncheck the Project Analysis options. Or you could change your TS files to be JS files, as the language service only runs on TS files.
TypeScript supports compiling a whole project at once by including the tsconfig. json file in the root directory. The tsconfig. json file is a simple file in JSON format where we can specify various options to tell the compiler how to compile the current project.
The TypeScript compiler compiles these files and outputs the JavaScript with . js extension by keeping the same file name as the individual input file. The TypeScript compiler also preserves the original file path, hence the . js output file will be generated where the input file was in the directory structure.
In RC2, you can disable it by adding TypeScriptCompileBlocked to the .xproj file.
<PropertyGroup>
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
</PropertyGroup>
This worked for me, add this to you .xproj file
<PropertyGroup>
<TypeScriptCompileOnSaveEnabled>False</TypeScriptCompileOnSaveEnabled>
</PropertyGroup>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With