-
Notifications
You must be signed in to change notification settings - Fork 196
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
Language service is broken again #11031
Comments
@Peter-Juhasz That does not sound good at all. Can you just confirm a few things for me please:
If none of the above is fruitful, and you still don't see Razor Logger Output available in the Output Window, I think perhaps a Repair might be the way to go. It's a bit of a sledehammer approach but I can't think of any reason the logs shouldn't show up. I checked my own 17.12 P3 install and didn't have any issue seeing logs. |
(No extensions enabled, no proxies/VPN, etc.) HTML and C#:
What did not help:
Logs: Now I have the Razor Logger Output back in the Output pane, but don't know why. I remember a log message something like "unable to get semantic tokens for Host version 4", but forgot to copy it, sorry about that. What seemed to help for some degree:
But unfortunately, it did not. (I'm writing this post while testing it this morning.) I restarted VS again, and now different parts are broken:
And the next restart:
Next attempt:
I have not tested VS repair (although I did that recently some time ago but before P3) or the preview feature switch for code generation yet, but the whole system feels super fragile. Testing any of these workarounds may take time, because having a working VS+Razor may be just "luck", and we have to wait for like a week, to say that "there is high probability" that the workaround helped. Is there any resource allocation for reliability? I can see language feature bugs are covered with unit tests, and although integration tests with the hosting environment VS (or VS Code) may not be that easy, but it may worth some investment. Or is this "co-hosting" theme supposed to help too? (Sorry for the off-topic I'm just curious. Both for the technical aspect and as a user, what will finally bring a shift in reliability. If you have any docs about that topic, I would be happy to read that.) |
Ugh, sorry that you're experiencing this. Let me tackle the easy bits first.
We do have integration tests, they run twice per day, and are generally green. We did have some recent failures, specifically around that "Force runtime code generation" flag I mentioned, however they have mostly been addressed already, and sadly were not the types of failures you are experiencing. In fact, now that you've supplied more information, I don't think that option is relevant to what you're seeing: It certainly won't have anything to do with logs not appearing, or components not being discovered. There isn't any doco, but if you're curious the integration tests are here, and they run on an Azure DevOps pipeline against the latest nightly build of Visual Studio. The intention is to find reliability issues very early, and indeed the last two commits that went into 17.12 Preview 3 (#10967 and #10949) were to fix bugs that the integration tests identified. Just to be clear - these bugs are fixed in your build, and they're not the issues you're running into anyway. We used to run integration tests on ever PR, against the latest public preview build of Visual Studio, but had to remove that because it got to be almost impossible to restrict our dependencies to only what is in preview, and policy means a build against non-preview Visual Studio is not allowed from an open source repository.
We have had one other report of intermittent outlining, though not accompanied with any of the other issues you're seeing. Outlining is an interesting "canary in the coal mine" because it happens very early in the lifecycle of a document being opened.
This is the oddest issue of all, and I think the one that we should focus on first. It is surprising, and I've never seen it before, but what is extra surprising is that other Razor features seem to be working. Our output window logger is in the same DLL and DI container as our features that receive project information, yet seemingly only half of that is working. From memory, you are allowed to log a VS Feedback issue, but not include a recording, is that correct? How does your company feel about taking a memory dump of devenv.exe from Task Manager, and emailing it to me instead? :) If you can log a feedback issue (without a recording is fine) when you see the problem, there are some things that would be captured which might prove interesting. If you want to see what they are for yourself, the things I would look for are:
The presence of anything in the
I completely understand, and it would be remiss of me not to mention that the VS Installer now includes a "Rollback" function, if going back to Preview 2 is a better solution for you. I greatly appreciate all of the effort you go to when logging issues, and investigating these suggestions, but I realise you have actual work to do too :) |
Does a Repair put you in to a better working state? |
Sorry for the late reply, I was on vacation. @davidwengier thanks for the detailed reply, I appreciate it! :) @phil-allen-msft Here are my observations: I did a full repair for VS 17.12 P5 and have a clean clone of the repository. Other environment context: latest stable Windows 11 24H2 (26100.2161), default apps + Office installed + Visual Studio (no extensions enabled). OFF:
First try Little slow, but everything worked fine: Rogzites.2024-11-01.170252.mp4Second try, third try Razor is completely broken: Rogzites.2024-11-01.170406.mp4No logs either: Fourth try Visual Studio itself is broken (I didn't try to open any projects this time): Fifth try Everything works fine again. I'll take a look at the logs in the file system. |
In
No entries in Some warning entries similar to this one in <entry>
<record>1176</record>
<time>2024/11/01 14:20:18.407</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>PkgDef encountered data collision in section 'HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\17.0_0fbc1ce6_Config\TextMate\LanguageConfiguration\GrammarMapping' for value 'source.css'</description>
<path>c:\program files\microsoft visual studio\2022\preview\common7\ide\commonextensions\microsoft\razorlanguageservices\microsoft.visualstudio.razorextension.custom.pkgdef</path>
</entry> |
Apologies for asking the obvious questions, but did you double check the log level option after doing a repair? It might have been reset, which means logs will only appear is something goes wrong. The two popups you got about package loads are worrying though. Nothing to do with Razor, sadly, but clearly something that isn't right. A VS Feedback issue might be the only next step. |
No, good call. :) I didn't know these categories appear only on first input - good to know. But even in that case, since the log level was on
That is clear, but I'll leave that to people who has nerves of steel. :) |
We appreciate all your feedback, and hope that repair/reinstall/a future change unrelated to Razor can fix the 2 package load popups and have VS working as you expect. |
VS 17.12 P3
This update is completely unusable.
What is interesting that HTML and C# seems to work.
And there is a huge number of errors for all components:
There are not even logs related to Razor like they used to be in VS:
The text was updated successfully, but these errors were encountered: