Skip to content
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

Visual Studio 17.5.1 broke F# intellisense #14901

Closed
vsfeedback opened this issue Mar 15, 2023 · 16 comments
Closed

Visual Studio 17.5.1 broke F# intellisense #14901

vsfeedback opened this issue Mar 15, 2023 · 16 comments
Labels
Area-LangService-Diagnostics FCS code analysis, diagnostics, red squigglies Bug Impact-High (Internal MS Team use only) Describes an issue with extreme impact on existing code.

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work] [regression] [worked-in:17.5]
After upgrading to Visual studio 17.5.1 (from 17.5), Intellisense in F# source files doesn't work properly anymore. The most visible effect is that no errors are shown and I need to build to see errors in Error List pane


Original Comments

Feedback Bot on 3/6/2023, 01:50 AM:

(private comment, text removed)


Original Solutions

(no solutions)

@github-actions github-actions bot added this to the Backlog milestone Mar 15, 2023
@vzarytovskii
Copy link
Member

I saw once this but couldn't reproduce. I wonder if it's a result of the incremental builder issue, or vallinkage issue.

@MaxWilson
Copy link
Contributor

MaxWilson commented Mar 16, 2023

I have also had this issue. Sometimes even building does not make the errors show up in the error pane or inline in the code, only in the Output window. Known workaround: closing Visual Studio and re-opening it fixes it for a while.

For a while I thought it might be because I had Text Macro extensions installed, or Github Copilot, but I've reproed the issue without them.

If I find a screenshot I will post it but for now I can merely confirm that the issue is still active in VS Version 17.6.0 Preview 2.0.

image

@MaxWilson
Copy link
Contributor

MaxWilson commented Mar 19, 2023

Solved for now by rolling back to VS 2022 Version 17.4.2. Edit: switching errors to "Build Only" instead of "Build + Intellisense" tentatively seems to be a viable workaround too--after Control + Shift + B, build errors show up correctly in Intellisense. Never mind, it eventually recurred even with "Build Only".

My current workaround to is jump back and forth between VS 2022 and VS Code.

@0101 0101 added Bug Impact-High (Internal MS Team use only) Describes an issue with extreme impact on existing code. labels Apr 3, 2023
@0101 0101 modified the milestones: Backlog, April-20203 Apr 3, 2023
@0101 0101 added Area-LangService-Diagnostics FCS code analysis, diagnostics, red squigglies and removed Needs-Triage labels Apr 3, 2023
@vzarytovskii vzarytovskii removed this from the April-2023 milestone May 4, 2023
@ghostinside
Copy link

just updated today to 17.7, F# intellisense stopped recognizing c# references despite the solution being built successfully

@vzarytovskii
Copy link
Member

just updated today to 17.7, F# intellisense stopped recognizing c# references despite the solution being built successfully

We'll need a bit more info here.

Is it new style or old style project?
Does it work in 17.8 preview?

@ghostinside
Copy link

it does not work in preview,

C# project (.net 4.8): {3A499F41-1A5A-46A1-BF01-8ECADB9C4223}
F# project (.net 4.8, fsharp.core 7 ): {50b30417-ae00-46c5-9fd1-f5094510cf4d}

@ghostinside
Copy link

image

@ghostinside
Copy link

ghostinside commented Sep 8, 2023

it recognizes System namespace, but not any "custom"

@vzarytovskii
Copy link
Member

@0101 it looks like the same issue we had with old projects, do you remember where the link for vsix is?

@0101
Copy link
Contributor

0101 commented Sep 9, 2023

Yeah, here's a VSIX that fixes the issue with old-style projects. You can install it and see if it helps.

@ghostinside
Copy link

live is getting better

image

@ghostinside
Copy link

@0101 what do you mean by old-style projects? where I can read about old vs new, should I upgrade existing projects?

@MaxWilson
Copy link
Contributor

Solved for now by rolling back to VS 2022 Version 17.4.2. Edit: switching errors to "Build Only" instead of "Build + Intellisense" tentatively seems to be a viable workaround too--after Control + Shift + B, build errors show up correctly in Intellisense. Never mind, it eventually recurred even with "Build Only".

My current workaround to is jump back and forth between VS 2022 and VS Code.

Follow-up: this issue does not currently repro for me in Version 17.8.0 Preview 1.0. Intellisense is a bit slow because I'm using a weak computer, but it does eventually update and remove errors after 5-6 seconds, whereas previously the errors would remain indefinitely.

@0101
Copy link
Contributor

0101 commented Sep 11, 2023

@0101 what do you mean by old-style projects? where I can read about old vs new, should I upgrade existing projects?

Can't really find any good docs about this. But with .NET Core came a new format for csproj/fsproj files. It starts with:

<Project Sdk="Microsoft.NET.Sdk">

Whereas the old format starts with

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

And they are handled differently by VS.

If you can it's probably a good idea to upgrade to the new format, but I don't know if there's an easy automatic way to do that.

Here's an article to possibly get you started: https://www.hanselman.com/blog/upgrading-an-existing-net-project-files-to-the-lean-new-csproj-format-from-net-core

@vzarytovskii
Copy link
Member

vzarytovskii commented Sep 11, 2023

There's a tool for migrating them:
https://github.com/dotnet/try-convert

I haven't tried it personally, but it should "just work" for typical projects..

@T-Gro
Copy link
Member

T-Gro commented Nov 2, 2023

Closing as the issue does not repro anymore (see comments above), can be reopened if it happens on latest tooling again.

@T-Gro T-Gro closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-LangService-Diagnostics FCS code analysis, diagnostics, red squigglies Bug Impact-High (Internal MS Team use only) Describes an issue with extreme impact on existing code.
Projects
Archived in project
Development

No branches or pull requests

6 participants