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
[BUG] Intellisense broke #329
Comments
is your vscode status bar show the vscode keep processing workspace in background? |
Hi from ubuntu: Projects in bar spinning endless and no autocomplete. Thanks |
I'm having this same issue - my output log stops at |
Also from #333 we've learned that having the Unity Package |
Tried regenerating the sln files from Unity also adding those as you shared. Relevant logging only from C# tap that outputs Projects keep spinning. .NET open / close projects does nothing in my editor Another note, closing and reopening the editor, ask me to reinstall the Unity package ... |
Do you see any issue or exception in Unity that could be triggered by our project generation? In your Unity project folder, do you see the .sln and .csproj that our package should generate? In Unity's preferences, External Tools, could you do Regenerate project files just in case? Do the .csproj and .sln look weird? There are other Output categories, like C# Dev Kit, C# LSP Trace Logs. Do any of those have any information? C# lsp trace log: (i install other extensions back after i failed to configure my vscode so i filter them with c#) What happens if you use the VS Code command .NET Open Solution? Or .NET Close Solution then .NET Open Solution? Or .NET Restart Language Server |
Thank you for looking @jbevain ! I didn't find anything odd about my project files, and everything else works as it should. I did just run After more fiddling, I ran |
I have tried regenerating the project files many times to no avail. .Net Clean doesnt appear to do anything and I do not see anything populate on any of the logs. I do get this error though when running .Net Open Solution, perhaps something wrong with the .sln? The files themselves do not look weird on first glance, showing VisualStudio.Launcher.csproj.15.0 and the .sln also appears to show 15 |
I had that same issue initially with the extension where it kept deleting itself and everytime vscode opened it asked to install it. |
tried .net close->open or clean->open, but my vscode still keep processing workspace in background |
I fixed on my PC earlier (after running in circles), and just fixed it on my Mac with a much more focused set of steps. I noticed some error messages about my project files being out of date while I was doing this. In Unity
In VS Code
Hopefully this helps someone! |
I'm glad you got your project working and appreciate the help! In my case though the steps didn't change anything for my projects. I tried deleting all the .csproj and the .sln, the project manager visual studio extension, and then restarted the process again. It still is stuck at the same spot of the posts above, no intellisense, server looks like it starts ok, no issues in the other consoles, I get no errors or anything strange in Unity, and I get the error that no solution is found when .Net Open Solution is run. Thanks y'all for the helpful leads. |
Do you guys have sdk installed in program(x86)? |
I tried to run the language server with debug logging and when moving hover The Solution Explorer tab shows the sub projects that looks ok. However, trying to expand them result in the usual endless spinner Where could I see the logging of the Projects loading process ? Thx |
For me adding the {
"dotnet.defaultSolution": "path/to/my/solution/file.sln"
} But most of my projects are simple console apps without a solution file... what should I do then? And by the way in my case this is not related to Unity - just plain C# console apps. |
@nkoudelia I appreciate the insight, was there anything else you did besides modify the settings.json? I was not able to get the fix to work unfortunately. I still get the same error, but it populates in the console immediately rather than after running .Net open solution: It's like vscode is not correctly loading the project files and/or solution. Is there anything amiss from this .csproj file that may be causing the issue? I omitted the sections following the pictured that have all the Reference Include's. -*.sln |
Unity extension add it by its own. However is not enough to have intellisense to work. Seems to me there is something not working properly in the Projects parts as it fails after a while loading subprojects |
Maybe remove all unity plugins and install it again |
Be careful removing your |
I'm trying to summarize the thread with the following: 1- Make sure you have the proper
2- Make sure you have the proper
3- Make sure C# Dev Kit is not displaying any error message:
4- Inspect your
5- Miscellaneous
|
I think the solution is here (section 2): I guess you are not using the latest VS Editor package v2.0.20. Please update using Unity Package Manager. |
I had the same problem of not getting code navigation and completion working, I followed all the steps in comment #329 plus a few dozen other SO and issue discussions too, spending a few hours trying everything from re-installing Unity VSCode, trying different extensions versions, etc. Finally arrived to a workaround that worked for my issue. I had the problem of infinite load, and of project not loading without helpful messages. Upon expanding the "Solution Explorer" tab I saw "A compatible .NET SDK was not found" and that ended up taking me to a few more issues discussed in the past month, with finally a workaround that worked. Hope that helps you. |
I did everything on section 2 except version of editor, I updated Editor package v2.0.20 but it did not fix anything and now I am having this error: |
Encountered the same problem as CallMeTheWolf |
It seems there was an issue on the Unity side when fetching the package. Could you try to close Unity, then delete your If you are still hitting the issue after this, we recommend to remove the meta-package |
Even if I delete one project's |
Maddening... ugh sigh. VSCode was working fine up until today when I installed the Microsoft Unity extension. I have an infinite server load problem and so far nothing has worked from above. UPDATE: Finally got it working on both MacOS 12 and Windows 10. My setup was similar to @cacheflowe, so I'll repeat some of his steps. In Unity (
In VS Code I downloaded the following (after removing all other extensions):
Lastly in VS Code:
To my surprise it worked (intellisense finally!) on both Mac and Windows by this point. Time to reconfigure both my settings files now... UPDATE 2: The issue was specifically hiding the "files.exclude": { This sounds like an obvious mistake but confusingly it wasn't an issue in the past. Anyway, everything seems to work now. |
I tested, Temporary resolution of no code prompts and intelligent perception issues: I have annotated all of the user's settings. json.
|
For me, my VSCode had the wrong solution selected after installing the new Microsoft Unity extension. I think this is due to my project including code from other projects in it. So running from the command palette: Then I had 3 selections to choose from for the solution. So I chose the one for my project and after it loaded for a bit, it is now working. |
@Wollbobaggins thanks for taking the time to report how you fixed your issue. Today we're simply generating a new Now we're thinking about adding a step that looks at an existing |
I'm not sure what to expect here - there's tons of junk in the autocomplete, such as all the floats that you can write with 3 digits. does this count as "working"? Also, all the variables, classes, etc, are listed as type "abc" which isn't super helpful. |
We added a bunch of setting fixes in the VS Editor Package |
What counts as working? My first couple pages of intellisense suggestions are floating point numbers like .015f, pretty darn useless. |
Hi, At this point we believe the
Because this issue evolved with multiple different issues, if you hit more loading issues please open a new one. Thank you! |
@alanbork please open a new issue for this, thank you! |
Describe the Issue
Intellisense is not picking up anything from Unity variables/methods. It worked prior to installing the new extension. The problem began when switching to Microsoft Unity extension. A few examples are provided.
Thank you for your time and assistance.
Steps To Reproduce
Expected Behavior
Intellisense to pick up Unity Variables and functions. When typing the intellisense populate with options used by unity. Colors change and when hovering over a variable vscode gives the tooltip.
Environment Information
Extensions:
The text was updated successfully, but these errors were encountered: