You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compile on Build / Compile on Save problems with TS 1.8 in Visual Studio 2015 #6782
Since I installed TS 1.8 I've started noticing that the compile step is not being executed in Visual Studio either on save or upon build when there are existing *.js files in place.
So if I'm working on viewModel.ts then I need to delete viewModel.js and trigger a Visual Studio build in order that a new viewModel.js is created.
I wondered if it might be related to presence of the compileOnSave flag in tsconfig.json (which I believe is supported as of TS 1.8?). However setting it to true and removing it entirely made no discernible differerence to behaviour. (I tried closing and reopening the project in between changes in case there were caching issues but no change.)
So compileOnSave seems entirely broken (i.e. it never compiles on save) and compile on build only works if the existing js files are deleted.
the compileOnSave property support is not in a released version yet, Paul van Brenk (@paulvanbrenk) checked it in today :). it should be available for the 1.8.2.
Can you check your tools\options\Text Editor\TypeScript\Project\Compile on Save, do you have "Automatically compile TypeScript files that are not part of a project" checked? my guess is no, and that is why it is not working. with #2326, you should be able to turn it on using compileOnSave property in tsconfig.json.
Mohamed Hegazy (@mhegazy) - I'm guessing with the VS 2015 TypeScript 1.8 beta plugin I shouldn't expect compileOnSave to be working? I've noticed whilst using Visual Studio that saving is still generating the js files still (even though the flag is set in tsconfig.json).
I wanted to ask about building as well but I'll break that out into a separte issue.
Is tsconfig.json and compileOnSave expected to work on VS 2013? I've installed the latest v1.8.2 of TypeScript for VS2013 and it's missing the "TypeScript JSON Configuration File" new item template for tsconfig.json, adding it manually doesn't disable the TypeScript property page on project properties and none of the configuration on tsconfig.json seems to be overriding either?
Here's what I don't get: it sometimes works fine and others it doesn't!
I can't for the life of me figure out what I'm doing right or wrong when, or if I even have any influence on this at all. It's almost more frustrating to have it work "sometimes" than to just never work.
My workaround sucks. Today, it simply doesn't work so I am back to the habit of hitting "Rebuild" every time I make the tiniest change. Please tell me you've found a better temporary workflow/workaround until this is fixed!!!
But yesterday it was all unicorns and rainbows. Everything was flowing beautifully in the same solution, same IDE, same computer. No idea what changed. If it works sometimes, maybe there's a tweak to get it to work always?
I guess this problem has been around for a while now and like me, if you're still pushing through you must have come up with a pattern, habit, workflow, or workaround that is getting you through each day until this is fixed. Mine is to "rebuild" the whole solution every time I make the tiniest change to any .ts file. Surely someone has come up with a better way. Please do tell!
We found an issue with compile on save and tsconfig.json files, that depended on the order we processed files, which is not always the same. This fix is part of VS 2015 Update 3 [0].
[0] I can't tell you when that will be released, but the RC release has other TypeScript issues, so don't install that.
I installed the Update 3 RC and it has helped with a lot of other problems but not this one. Most vitally, it made the .tfignore file work, which I absolutely need when committing lots of small typescript files to source control and wanting to ignore the transpiled .js and .map.js files.
Paul van Brenk (@paulvanbrenk) could you maybe provide a little more detail on the "order we processed files" as I'd like to tinker but honestly don't know what you're talking about.
I have very similar issues. Everything compiles correctly, but it takes a very long time, and sometimes randomly flakes out. Wasn't like this with the previous version of TSC.
gleno this is an old issue. do you mind filing a new issue, sharing more details about what you are seeing, what version of VS you are using what version of TS, and a project to help investigate the issue.
I'm using VS 2015 Update 3 and are experiencing a very similar issue. The typescript compiler seems to only work when I do a build. However, if I do a build, and no server side code has changed, the typescript code will not compile.
I've recovered my problem by installing an older version of node tools. If
you have just updated, this may be your issue.
On Thu, 28 Jul 2016 at 23:42, Mike Lunn notifications@github.com wrote:
I'm using VS 2015 Update 3 and are experiencing a very similar issue. The
typescript compiler seems to only work when I do a build. However, if I do
a build, and no server side code has changed, the typescript code will not
compile.
I had the same problem in my visual studio update 3.
It's seems that widows didn't get my typescript 1.8 version, but hold the 1.0 version. so I changed it manually. Now it's work. on saving a .ts file, all my project being transpiled correctly.
Activity
mhegazy commentedon Feb 2, 2016
the
compileOnSaveproperty support is not in a released version yet, Paul van Brenk (@paulvanbrenk) checked it in today :). it should be available for the 1.8.2.Can you check your tools\options\Text Editor\TypeScript\Project\Compile on Save, do you have "Automatically compile TypeScript files that are not part of a project" checked? my guess is no, and that is why it is not working. with #2326, you should be able to turn it on using
compileOnSaveproperty in tsconfig.json.johnnyreilly commentedon Feb 2, 2016
Yup that solved it. Thanks @mhegazy.I'll look out for
compileOnSavelighting up in when 1.8.2 ships.johnnyreilly commentedon Feb 16, 2016
Mohamed Hegazy (@mhegazy) - I'm guessing with the VS 2015 TypeScript 1.8 beta plugin I shouldn't expect
compileOnSaveto be working? I've noticed whilst using Visual Studio that saving is still generating the js files still (even though the flag is set intsconfig.json).I wanted to ask about building as well but I'll break that out into a separte issue.
paulvanbrenk commentedon Feb 16, 2016
John Reilly (@johnnyreilly) Indeed, the
compileOnSaveoption needs new Visual Studio bits.johnnyreilly commentedon Feb 16, 2016
Thanks Paul van Brenk (@paulvanbrenk).
mythz commentedon Feb 23, 2016
Is
tsconfig.jsonandcompileOnSaveexpected to work on VS 2013? I've installed the latest v1.8.2 of TypeScript for VS2013 and it's missing the "TypeScript JSON Configuration File" new item template for tsconfig.json, adding it manually doesn't disable the TypeScript property page on project properties and none of the configuration ontsconfig.jsonseems to be overriding either?mhegazy commentedon Feb 23, 2016
Demis Bellot (@mythz), tsconfig.json is not supported for Visual Studio 2013. only Visual Studio 2015.
codler commentedon Feb 29, 2016
Seems
compileOnSaveare not executing same path as VS project root, becauseoutis generating on different path when i do build respective savemhegazy commentedon Feb 29, 2016
Han Lin Yap (@codler) can you share your project?
paulvanbrenk commentedon Feb 29, 2016
Han Lin Yap (@codler) which version of TypeScript? We've fixed issues in that area.
hcapp01 commentedon Mar 17, 2016
Paul van Brenk (@paulvanbrenk) I can repro colder's issue on 1.8.4.0.
11 remaining items
mhegazy commentedon May 13, 2016
Mike Graham (@cmichaelgraham) do you mind filing another issue for this?
mhegazy commentedon May 13, 2016
and hello Mike Graham (@cmichaelgraham), good to see you!
paulvanbrenk commentedon May 13, 2016
Not sure, are the other settings in the
tsconfig.jsonpicked up?Methodician commentedon Jun 24, 2016
Here's what I don't get: it sometimes works fine and others it doesn't!
I can't for the life of me figure out what I'm doing right or wrong when, or if I even have any influence on this at all. It's almost more frustrating to have it work "sometimes" than to just never work.
My workaround sucks. Today, it simply doesn't work so I am back to the habit of hitting "Rebuild" every time I make the tiniest change. Please tell me you've found a better temporary workflow/workaround until this is fixed!!!
But yesterday it was all unicorns and rainbows. Everything was flowing beautifully in the same solution, same IDE, same computer. No idea what changed. If it works sometimes, maybe there's a tweak to get it to work always?
Methodician commentedon Jun 24, 2016
Please share your workarounds
I guess this problem has been around for a while now and like me, if you're still pushing through you must have come up with a pattern, habit, workflow, or workaround that is getting you through each day until this is fixed. Mine is to "rebuild" the whole solution every time I make the tiniest change to any .ts file. Surely someone has come up with a better way. Please do tell!
paulvanbrenk commentedon Jun 24, 2016
We found an issue with compile on save and
tsconfig.jsonfiles, that depended on the order we processed files, which is not always the same. This fix is part of VS 2015 Update 3 [0].[0] I can't tell you when that will be released, but the RC release has other TypeScript issues, so don't install that.
Methodician commentedon Jun 25, 2016
I installed the Update 3 RC and it has helped with a lot of other problems but not this one. Most vitally, it made the .tfignore file work, which I absolutely need when committing lots of small typescript files to source control and wanting to ignore the transpiled .js and .map.js files.
Paul van Brenk (@paulvanbrenk) could you maybe provide a little more detail on the "order we processed files" as I'd like to tinker but honestly don't know what you're talking about.
gleno commentedon Jul 5, 2016
I have very similar issues. Everything compiles correctly, but it takes a very long time, and sometimes randomly flakes out. Wasn't like this with the previous version of TSC.
mhegazy commentedon Jul 5, 2016
gleno this is an old issue. do you mind filing a new issue, sharing more details about what you are seeing, what version of VS you are using what version of TS, and a project to help investigate the issue.
mikelunn commentedon Jul 28, 2016
I'm using VS 2015 Update 3 and are experiencing a very similar issue. The typescript compiler seems to only work when I do a build. However, if I do a build, and no server side code has changed, the typescript code will not compile.
gleno commentedon Jul 28, 2016
I've recovered my problem by installing an older version of node tools. If
you have just updated, this may be your issue.
On Thu, 28 Jul 2016 at 23:42, Mike Lunn notifications@github.com wrote:
paulvanbrenk commentedon Jul 29, 2016
Mike Lunn (@mikelunn) As Mohamed mentioned this is a very old issue, can you file a new issue with a sample project. And
diagnosticbuild logs. Thanksdudih commentedon Aug 18, 2016
I had the same problem in my visual studio update 3.
It's seems that widows didn't get my typescript 1.8 version, but hold the 1.0 version. so I changed it manually. Now it's work. on saving a .ts file, all my project being transpiled correctly.
For more info: http://stackoverflow.com/questions/39021808/vs2015-adding-watch-true-to-tsconfig-json-causing-jserrorscriptexception-0x/39022452#39022452
ybarbaria commentedon Oct 20, 2016
In typescript 2, you need to delete "outDir" in your tsconfig. Works for me.