-
Notifications
You must be signed in to change notification settings - Fork 813
F# intellisense sometimes stops working #12982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm seeing something similar with FSharp.sln. It seems like I need to run Build.cmd every time before I open VS, otherwise the F# integration is completely dysfunctional. |
I've checked the latest 17.2 preview as well as 17.3 from |
@vzarytovskii I simply don't understand why this issue was closed - have you in any way verifed it? I'm constantly experiencing this problem, also on newest VS 17.2.0 Preview 6. Below two merged screenshots: upper before deleting obj/project.asset.json, lower: after deleting. |
I explained why I closed it - I was unable to reproduce it on the latest 17.2 and 17.3. on VisualFsharp solution with which I work daily. I will reopen it since apparently, it needs more investigation. The problem is to get it to reproduce so we can debug it. |
VisualFSharp.sln is still broken for me every time (it feels like) I open it without doing a restore with Build.cmd. |
This is the problem, I don't see it, I have it currently open and everything seems to be fine (I'm on the latest 17.2 preview). It's hard to debug something which does not reproduce :( Do you not run build.cmd whatsoever? |
Building it for the first time with build.cmd is required for tooling to work properly, unfortunately. |
The first time after cloning/clean, I know, that's not the problem. My routine:
I might have seen this on different solutions, but it must be fairly rare. Also pretty sure I didn't experience this with preview versions of 17.1. |
Hm, I see. I will try to repro with these steps. Build.cmd is also needed for building the Proto compiler. Can you try opening compiler service solution and see if anything is different for you? It's in the |
Interestingly build.cmd does not help with this solution. When I try to do a build in VS, I get |
Before I started digging too deep, @cartermp, sorry for pinging, but do you maybe know where should I start looking, or maybe this rings a bell to you? |
I wouldn't have a clue, but given there are two indicators (delete project.assets.json and the "failed to restore" message) it's likely a nuget restore failure. I don't know how to debug these though. I'd suggest pulling in someone from the project system or nuget client team to help figure it out. |
@daniel-wojcik by any chance, do you have a sample solution you can reproduce it every time? |
@vzarytovskii unfortunatelly I have no such solution which could be shared, but even on this one I'm using the problem occurs from time to time - no repro steps. |
This has somehow gotten even worse in 17.3 Preview 1. I'm now regularly seeing the same problems in projects outside of VisualFSharp.sln almost without fail.
|
I'm looking at it now, do you maybe have some public repo in mind you've seen it reproducing? |
Sure, I've opened https://github.com/Zaid-Ajaj/Fable.Remoting at random (for the first time in a long time). I had Fable.Remoting.DotnetClient/Proxy.fs and Fable.Remoting/MsgPack/Write.fs opened from last time. Proxy.fs was the active tab and after a while I started getting tooltips, but proper syntax coloring did not kick in until I reopened the tab. Write.fs was OK after I switched to it. Then I reopened VS and the active Proxy.fs loaded up normally. Then I switched to Write.fs and nothing was working when the background tasks had finished. Reopening the tab did not help at all and other files in the MsgPack project behaved exactly the same with F# integration completely busted. .NET SDK: Runtime Environment: global.json file: Host: .NET SDKs installed: |
Ok, let me try and debug the completion provider and language service to see if I can have a repro locally. |
Oh boy... Latest
Same behaviour with cleaned up artifacts, but with pre-built Okay, it seems I can work with it. FYI @dsyme @KevinRansom @KathleenDollard @TIHan |
So I am not completely loco, good to have a repro. The workaround of deleting |
Looks OK, thanks. |
Great that this is fixed. Is 17.3 imminent? If there is a 17.2.x after the current one may I suggest this gets put in that. F# in VS is unusable without the fix.
This is one of these! |
It will unlikely make it to 17.2. It has been released already and I'm not sure there will be another servicing release. |
This will work in my org, but it may be impossible to communicate this to all F# users. Maybe temporary notifications at the top of the main forums would work (slack, this repo, fsharp community forum), linking to the comment #12982 (comment) . @ReedCopsey @dsyme is that reasonable? I believe a large proportion of F# users will just conclude that it the language doesn't work, until VS 17.3 is out. |
StackOverflow questions/answers get good search ranking so the question I posted "Visual Studio F# Intellisense stopped working" pointing back to this GitHub discussion #12982 may help get the word out. If you have a better answer than the answer I cobbled together then please post and I will up vote. |
If F# needs a critical fix, which this one arguably is, will the VS release team tell you tough luck? Do we only get to piggyback on someone elses's hotfix? Sad! |
@kerams I had this problem and it was critical. But then I restarted VS and recompiled and the Intellisense came back. Does this not work for you or others? See: https://stackoverflow.com/questions/72741952/visual-studio-f-intellisense-stopped-working |
@rfreytag This did not work for me. After VS fell into a bad state, I couldn't get it back even after rebuilds, cleans, restarts and reboots. I had to fallback to using VSCode. |
I am not sure VS 17.3 preview with the fix has been released yet. Or did you install VSIX and it doesn't work for you? |
@vzarytovskii To be clear, I am referring to the situation before your fix. (Thank you very much for your efforts btw!) I assume this fix will remediate my issues with VS |
Oh, got it. Sorry for troubles. We will also try to make it into 17.2 servicing release (cc @kerams). |
@vzarytovskii, great news, thanks. @rfreytag, it's a workaround, but an annoying one. You really don't want to do that every day (sometimes multiple times) for 2 months. |
Visual Studio 2022 version 17.3 Preview 3 and Visual Studio 2022 version 17.2.6 were released, and include a fix. |
@vzarytovskii Thank you and others so much for all your hard work on this - I know how much effort it has been, to identify the root of the problem and expediting the fixes into the release branches. |
Hello Everybody |
(issue resolved, was related to double listing of a file within the same .fsproj. Checking how best to report it and if there could be any legit situation of intentionally wanting to compile the same file twice) |
I'm running into this issue when using fsi files and a project reference (fsi files are in the referenced project). In the upstream project syntax highlighting stops working and when trying to inspect type information an error is shown.
|
17.4.5 didn't get a fix, please try on 17.5 |
@vzarytovskii are we talking VS 17.5 or F# 17.5, I've checked VS updates, is this a preview? how would I install it? |
VS, should be able to download normally here |
Awesome, looks like it was released yesterday https://learn.microsoft.com/en-au/visualstudio/releases/2022/release-notes |
I noticed that sometimes Intellisense in F# editor is not working (can't find any pattern): there are no member prompts, no syntax coloring and F12 key is also not functional. After spending some time to find the solution I came to conclusion that it is enough to delete project.assest.json file from obj project folder. After a few seconds after deleting this file all Intellisense functionality is restored.
Windows 10 21H2
VS 2022 17.2.0. Preview 2.0 and 3.0
The text was updated successfully, but these errors were encountered: