TypeScript Version: 2.0.3
When using "Find All References" in VS2015 in any language (e.g. C#) and the project has tsconfig.json, a typescript file, and any NPM @types package, then the "Find Symbol Results" panel is occasionally cleared for no obvious reason.
I've checked and this doesn't seem to happen when using typings or if there's no tsconfig.json
Steps To Reproduce
npm install @types/jquery --saveExpected behavior:
The results in the "Find Symbol Results" panel remains until a new "Find All References" is executed.
Actual behavior:
The results are cleared.
I do not see how this is related to TS or @types. The TS language service does not clear any windows. Roslyn is what drives this for both C# and TS. i would recommend filing this issue on https://github.com/dotnet/roslyn instead.
never mind. looks like we do clear the window. we should not do this.
Cool, thanks for confirming @mhegazy. I was a little skeptical of what the actual cause was even though everything thing I could see pointed to TypeScript, so it's good to know I'm not crazy.
Any news on a fix for this, it is pretty annoying?
I am experiencing this issue as well. I am using ts v2.0.6 in VS2015 since it was released, but I noticed my Symbol Results disappearing only a few weeks ago. Makes me wonder if I might have caused it with some setting change or something.
It also happens in all my projects even ones without a @types or tsconfig. I only have ts in my startup project.
Any update on this would be appreciated.
Glad to see some repro steps for this. It happens regularly to me, usually while trying to scrutinize a long list of references. :( I never saw this behaviour until using typescript so that was my hunch too as the culprit.
I upgraded to version 2.2.2 for VS2015 and the reference list problem seems to be fixed. Awesomeness!
So this issue can probably be closed.
...never mind, after 3 days of bliss it started happening again.
@mhegazy Any updates on this issue? It drives me nuts. It also happens in VS2017.2 (not only VS2015).
This bug is extremely aggravating, please address ASAP.
Offtopic: This bug, in addition to the painfully slow TypeScript IntelliSense in VS2017 actually forced me to switch to VS Code. Got used to it in a day. Very good stuff: chrome debugging (w/extension), blazing fast TypeScript support (IntelliSense and quick fixes are working instantly) and TypeScript linting (w/extension and tslint). And of course Find All References executes instantly and never disappears :)
I just upgraded to VS2017 and was disappointed to see this bug is still there. (I know this has already been mentioned.) I too have been tinkering with VS Code off and on, although I still find it a bit limited in features. I agree it does a better job with "Find All References", though.
I'm having some trouble repro'ing this issue. Should I expect to see it every time I run the steps above or only occasionally? So far, I've tried in VS 2015 Update 3 and VS 2015 Update 3 (internal build).
@mhegazy Do you have any more details about where in the code the results list is being cleared?
As @mhegazy pointed out, we do in fact clear that window whenever a script project is updated or deleted (in a method called, logically enough, ClearFindSymbolPane). This appears to affect both VS2015 and VS2017. I have yet to determine what, specifically, is triggering the project changes, but, presumably, it's happening in the background and causing the results window to be cleared when it completes.
This is probably not exactly the same issue, but if you create a C# project and find all references to a C# symbol, adding a TS file to the project will clear the results. There's no race - it happens every time.
I'm primarily working on a large project with both C# and TypeScript, I am also experiencing this problem, and I find this bug EXTREMELY frustrating.
Could the undesired call to ClearFindSymbolPane be happening due to changes in the "TypeScript Virtual Projects" project? Would it be possible for Visual Studio to ignore changes to that project for the purposes of calling ClearFindSymbolPane?
@slugworth that exactly matches my understanding of the problem. However, I'm still trying to determine what the call was protecting against (I understood it was a crash, but I've been unable to repro it) and what other mitigation is required if we remove the call.
@amcasey Thanks for your reply. If it is possible for me to test a build that omits or handles the call, I would be thrilled to help.
Thanks, @slugworth, I'll do my best to keep this issue up-to-date with our progress.
@amcasey Hello! I was wondering if there has been any progress? This issue is very frustrating to those who want to use TypeScript while developing in a large code base. Thanks!
@jvernon-panopto We have a tentative fix in progress for VS 2015 (which would become available in an update to the TS SDK). In VS 2017, we made a lot of changes to this part of the code and we're still investigating the best way forward.
@amcasey Awesome, thanks for the quick reply! My organization uses VS2015, so I am selfishly excited to hear that a fix for VS2015 sounds close. If there aren't any unforeseen testing issues, what's your timeline for a patch?
@jvernon-panopto For obvious reasons, we don't speculate about timelines. :wink:
We've submitted the VS 2015 fix, so it should be in an upcoming SDK update.
@amcasey Awesome! Thanks! Is there a way I can run a latest/nightly with this fix on my local VS2015 instance? Would "npm install -g typescript@next" suffice?
@jvernon-panopto, Unfortunately, this fix is on the VS side, so updating the npm package will not suffice. I'll be sure to post here as soon as it's available. 馃槃
We now have a tentative fix for VS 2017 as well. It should be available in a future update.
Hello! I see you have closed this issue. How can I retrieve a fix for VS2015? Thanks!
@jvernon-panopto, I think the fix made it into the RC of TS SDK 2.5: https://www.microsoft.com/en-us/download/details.aspx?id=48593
Most helpful comment
We've submitted the VS 2015 fix, so it should be in an upcoming SDK update.