-
Notifications
You must be signed in to change notification settings - Fork 676
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
Intellisense is gone (again) #6024
Comments
FYI reverting to v1.26.0 seems to fix |
Log comparison, may be useful. Old version (intellisense working): C# tab empty, but this is shown in omnisharp log:
New version (intellisense broken): No omnisharp anymore, but this is C# tab:
New version doesn't seem to try to load all loaded projects, just the first one in the workspace? |
@ZhaoYuNing123 It's easy by install another version |
Can I ask why "break thousands of people's workflows with absolutely no warning or explanation" was on the roadmap for the Visual Studio Code C# extension this month? |
Having the same problem, reverting to 1.26 is a workaround. |
@Skyedra: thanks for the logs, that's very helpful! The C# extension will be loading all of the projects listed in the solution file. Looking at your two sets of logs, I'm guessing it means you have projects that aren't in the solution file (like your core.csproj), but it also looks like your solution file has some things that aren't being loaded by Omnisharp (like it's trying to load Roy-T.AStar.Viewer.csproj, but can't find it). Is your solution file out of date with what is otherwise in your source folders? Do the projects it's failing to find actually exist? |
Revert to 1.26 worked for me too. I don't have a solution file, only a .csproj, is that going to be required going forward, if so, why? It worked just fine before. EDIT: Alternative workaround is enabling the |
@jasonmalinowski I'm not using a .sln for any of my code on the project (I'm not actually familiar with generating one outside visual studio classic, and thought that was just a legacy import thing), but I do have a .code-workspace:
Pretty sure the two settings were workarounds from previous omnisharp autoupdate breakage, though as omnisharp isn't used anymore I imagine those settings wouldn't affect anything. Looking at the core.csproj in particular (where astar lives inside of (src/Org/Astar, next to src/ProjectName), there is a core.csproj:
So it is a bit of a mystery why it's pulling an unused/unreferenced .sln file in a deep subfolder given the .csproj for that subproject doesn't reference it. And then ignores the src folder entirely. |
Also, project tree if it helps:
(as3tocs is not actively used, so it's not in the code workspace) |
@Skyedra: That is very helpful to have the project tree, so thanks. Just answering your comments in order:
Yeah you won't need those if Omisharp isn't active. (and generally you shouldn't need them going forward regardless...)
The v2 extension more aggressively prefers the solution file, or at least our assumption was if there was a solution file, you wanted that used. Did you have |
Thanks for the info; a couple thoughts so breaking this into sections: User prefs:I don't believe I have that setting in user prefs. Here's what I do have in settings.json:
Prioritization of solution files vs csproj files:I don't think prioritizing a solution file deep within the subtree is ideal. Also odd to ignore a csproj in the root of the subproject folder over a sln in a deeper folder. But more generally, I would definitely prefer trying to stick as close to the compiler logic as possible. My expectation would be something like:
(I respect due to being different tools, this simplification is perhaps much easier said than done. Just selecting based on there being a csproj or sln in the subproject's root folder would probably solve most cases, including my own) Also, if only one subproject at a time can be active (as in omnisharp), I can live with the intellisense project selector at the bottom like omnisharp had. However, being able to not deal with that fiddling would be a major feature worth upgrading for. User confusion on solution files in vscode:My impression as a user (which may not be accurate!) is that sln's are legacy and have been replaced by the set of smaller/user-readable files like csproj/code-workspace/launch.json/etc. My impression is they were mostly intended for easily migrating old projects from Visual Studio -> VS Code and not for using in new projects. I'm not deeply opposed to solution files, but I haven't used them since c++ days so they carry a certain amount of, uh, emotional baggage? I wouldn't want to have to manually add each cs file to a solution file, and manually keep directory tree vs solution tree filenames synchronized, etc. Also, I seemingly can't manage sln with the IDE, and I recall them being a PITA to do by hand... so all that is to say, I'm not much inclined to switch to using sln files at first glance. I do see there is some functionality with dotnet sln now, and I may not need to manage it constantly like in the old days, so I could potentially go that route. I also don't understand well the relationship between solution files and the new set of configs. IE, would I use a solution file instead of a workspace file? Instead of a workspace + csproj + launch files? So, that is all a way of saying that if the legacy behavior cannot be retained then the upgrade should be opt-in and provide clear migration guide. |
Not sure it's bug or design. I'm same page with @JustinGrote. I'm using it for Azure function and there has no solutions. Suddenly, all Intellisense is gone. I didn't realize that's because of latest update. Uninstall/Install VS Code and uninstall/install C# for Visual Studio Code again but not luck. 😣Finally, I decided to use v1.26.0. It's working back as normal. But I'm not sure what's the solution for this. Forever, should I stick with v1.26.0? 🙄 |
Install C# dev kit will fix all the problem. But I don't want this. Is this update a strategy to force us to use C# dev kit? |
In my output I see this... During install
Than it it stops reporting. The workaround is as the 'readme' suggests, to turn on Omnisharp.
|
on our company, we are using a workspace with a lot of repositores (like a mono repo) which every repository contains one or multiple sln/csproj files and also a code-workspace file for example my directory structure looks like this:
and i'm opening in this way its easier for me to search for source code accross all projects and repositories and after updating to the version from friday the console output also stopped at |
SOLUTION: How to use OmniSharp? |
this is same as downgrade basically. i hope they will fix it soon :( |
Going to comment to a few of you folks at once here, so my apologies if this gets a bit confusing:
I can't quite tell, based on your comments, is the current experience working well for you or are you running into friction here?
Just so I can understand your workflow a bit better, once you have VS Code open are you then using the switcher to switch between the project you're working on? Because looking at the Omnisharp behavior my gut is it'd still prefer the solution file (if that was mapped into your workspace), but then of course you could use the picker to change.
Absolutely not! One challenge with the existing Omnisharp project loading logic is it supports a lot of different scenarios and a lot of different workflows, so it proves to be a challenge to make sure we get all the cases right. |
@jasonmalinowski by my testing, these workflows were broken by the 2.0 (release) - And please confirm 2.0 release was intentional per #6040 because it seems to me like an accidental prerelease was made public since there's no Github release:
Both of these assume you haven't checked the "use legacy omnisharp", though if you have and you have C# dev kit installed, it is ignored (as stated in the documentation) |
@jasonmalinowski FYI:
I'm a guy who is developing central components and libraries for our projects; I have the need to search through all of our source code. This is why I (and other guys also) checked out every one of our repositories. VSCode can search a lot better than Azure DevOps 🙂. To test these changes, I'm switching between some projects and including them... Also, if I have some spare time, I'm helping other teams with their work. I already found this setting I hope this is possible with the language server and will not break anything on your side; otherwise, I have to create a new workflow for me. 😅 |
Please add
In your settings.json file at .vscode folder. It's working perfectly for me. |
Spoke too soon, didn't even reload the editor. Base functionality works with v2.0.356 pre-release, but it doesn't analyze the game files, so the imports are broken. |
@MrBrax I'm not quite sure what you mean by "it doesn't analyze the game files" -- can you open a separate bug and tag me and we'll investigate from there? |
General update for everyone: last night we uploaded 2.0.356 which adds support for loading all the .csproj in your workspace if there isn't a .sln anywhere to be found. There are of course plenty of workflows this still doesn't cover, but we wanted to get that out quickly to unblock some of the folks here. Right now that version is still in the prerelease channel but we hope to promote it soon. |
@johannesergon There is also a "load solution" command you can invoke. If you open the command palate (by default Ctrl+Shift+P on Windows) and search for "open solution" there's a command that will let you pick the other solution file. It's a bit strange right now in picking another one doesn't close the previous solution, so if you have A.sln that has some set of projects and then you also load B.sln, we'll be processing both projects. This may not be perfect for your workflow but I hope that brings it pretty close. |
In the current docs (that use omnisharp) it is instructed to enable roslyn analyzers or it won't get the symbols required for all the base classes and whatnot. I'm not sure if to open the issue here or for the game, considering it is invite-only and in development. |
@MrBrax File a separate issue here (or create a discussion) so we can discuss this further. There may not be much to discuss, but it'd be good to keep the conversation separate than this one. |
The issue template seems way too complicated and i can't find discussions on this project. I'll switch back to visual studio even though it's slow as molasses. |
2.0.357 added release version support for opening projects without a solution file and other tweaks requested in feedback. Please let us know if there are still lingering issues for us to track. Note: A known feature gap that we are working on is support for legacy framework projects tracked at #5721. |
looks good for me, thank you 🙂👍 |
@johannesergon Is that with DevKit installed? |
Yes, currently, I'm using And when I'm executing the command |
Have you filed a performance report for Visual Studio? Our team has a very high close rate for issues filed with these steps: |
No, but it's just a "it's how it is" issue, it's been the case for well over a decade if not two. It's just slow in general due to how heavy of an application it is. Currently using Rider but it also has some drawbacks, hoping this plugin will get working again in the future as i prefer vscode over all other editors. |
OK, @johannesergon I've filed microsoft/vscode-dotnettools#399 to track that. |
I'm going to close this bug as I believe we've made enough improvements (or explained things!) to unblock everybody who is in this conversation. If I've missed your comment or your workflow is still blocked, do please let me know, but let's open a new bug to track since this one is getting a bit long. To summarize, we've got the following changes in or clarified the following bits:
Thank you all for your feedback here especially explaining different workflows that we didn't anticipate. If you have a workflow that still isn't covered at all, or have other suggestions, please do file a new bug and feel free to tag me. We're still going to make more improvements here but at this point I think it's best to get new conversations now that this conversation has gone past 50 comments. 😄 |
Not overly thrilled all the solutions all still involve manual work to adapt to the new behavior in 2.x. Randomly breaking user workflows during autoupdates is something that's going to bleed vs code users over time. |
Unfortunately this isn't true. All this time later I have still been on-and-off encountering this issue on a few different machines throughout this month with completely different c# projects (all of which with an existing sln, not with multiple) and I've had to revert to 1.26 on all but one of my machines (thankfully its my work machine). Not sure why they are turning a blind eye to this issue as it will only become worse as majority of users stay on 1.26 as it becomes obsolete and the root problem still isn't fixed in 2.X EDIT:
This is pretty laughable since it only really seems they want to close this issue so people can't see how they handled the issue. Why would we make a new topic for the exact same issue that is still completely unresolved? |
@CarsonKompon The reason I requested new issues is simply because people who are having problem with IntelliSense (for entirely unrelated reasons!) see the title for this issue, go "IntelliSense is gone" and comment here, and then we get to tease all the issues back apart. There are a huge number of systems that all have to work to get Intellisense to work in the end and if those go awry the symptom is often the same. I've also had plenty of cases where a customer thinks an issue is already filed for what they're experiencing, only to discover once we fix it, it wasn't and had they spoken up earlier we could have gotten that fixed sooner. To confirm for your issue though, "with an existing sln", is the problem again we're picking up the solution when we shouldn't be, or the solution file does contain the projects you expect to load, and you're still not getting intellisense? |
its January and the issue is still there. Cant work because of this!! |
@stevephary Can you file a new bug and attach logs as requested in the bug? You can also file a bug from the extension itself which will attach some information automatically. Feel free to tag me so I can take a look. |
Same issue as new user with VSC. Not a good start to learn C# |
Hi, I have same issue with C# intellisense. Below is what I did, to workaround and make it worked in VS Code:
Disable both extensions:
Select C# file\project for Omnisharp Intellisense:
Now intellisense should works but it would be nice to have it fixed and worked with latest C# extensions. |
It seems we need to install IntelliCode for C# Dev Kit now. |
@erwinkramer That definitely shouldn't be necessary (unless you want it of course!) Can you file a new bug for us to investigate? |
Type: Bug
Definitely related to the latest crop of issues: microsoft/vscode-dotnettools#317
Not sure what happened; saw some c# update fly past when I booted up today and now intellisense doesn't work. I don't see anything terribly relevant like I normally would in the logs when autoupdate breaks something (like roslyn load error, omnisharp load error, etc).
This is like the fifth time an autoupdate has broken intellisense for me, so this is getting to be pretty frustrating. I don't need my IDE to autoupdate, I just need it to work. Gonna try to figure out how to stop autoupdates now. I respect it's a free tool, but when I'm down like this there's a real financial impact to me that doesn't make it worth me being microsoft's unpaid QA. Sorry for frustration.
Extension version: 2.0.320
VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:59:55.818Z)
OS version: Linux x64 6.2.0-26-generic
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
The text was updated successfully, but these errors were encountered: