I recently updated to VS 2017 and I'm using a solution that used to work perfectly in VS 2015. I have enabled the "Compile on save" function in Tools > Text editor > TS/JS > Project and I'm sure I'm using the correct "code generation" option, but VS won't compile any typescript file.
The js output file already exist, it was generated by VS 2015, and when I save the ts file the bottom bar shows the "Output(s) generated successfully" message but there is no change in the js file.
Note that the project is under source control, but both ts and js files are checked out for edit.
I read online that similar issues were been resolved with lastes VS updates, and I'm sure my version of VS is up to date.
Does anyone know what's going on?
Running tsc locally will compile the closest project defined by a tsconfig.json , you can compile a set of TypeScript files by passing in a glob of files you want.
Check ts file properties in Solution explorer. If Build action = Content, change it to TypeScript file
in a .NET Core 2.1 project in which I has used VS's New Project template for React, I had to edit the .csproj and change <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
to false
.
Why does this option even exist!?!?!
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