-
Notifications
You must be signed in to change notification settings - Fork 199
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
Many Errors in Dev console #10505
Comments
Downgrading from preview version (2.24.10), to release version (2.23.17) eliminates the errors. |
Update. Release version IS showing this error:
|
@jtsom I've tried out the scenario (aspire app in 2.33.17) and I haven't been able to reproduce the issue - my console doesn't have those errors and is relatively clean, doesn't seem to be much from the C# extension (expected) A couple questions:
thanks! |
|
I wonder if it's something specific to the Aspire project? Here is a relativly simple .Net 8 API project, that does not show the errors in the console. This is with the latest (prerelease) version 2.35.15 Opening the Aspire app causes the errors to appear, switching back to the API app, doesn't show errors. |
Opening another .Net web api solution, containing several projects, with the latest preview version, DID show all of the "Error: Illegal argument: line must be non-negative" errors - starting with one from the C# dev kit. As soon as those showed up in the console (after all the projects loaded), there were now 600+ errors in the error list, showing errors of the type "System.Void not defined" - basically an error on every line. Those errors are definitely causing problems with error reporting. |
Aha, I was able to get the illegal argument, line must be non-negative error today on a different machine (same Aspire project though).
taking a look... |
Transferring this issue to the Razor side (fyi @ryzngard, @davidwengier ) |
(@dibarbet) FYI Doing some testing, I found that the first version to show this problem is 2.33.17. That version is using a Preview version of Razor 9: Bump Razor to 9.0.0-preview.24281.3 I don't think that's a coincidence. |
For clarity, "Preview" here is just due to how Razor does package versioning. We don't ship any public packages to NuGet so we never "finalize" the version. Consider that engineering debt in naming alone and not an indication of the expected quality. For a fun history dive, the version up until after dotnet/vscode-csharp#7225 still said version |
Well, my point is, that up until that version (2.33.17) was using a version of Razor < 9 (preview or not). Once the extension was built against V9 of Razor, that is when the problems started. |
Understood, and thanks for reporting :). I just wanted to clarify on the naming because it is indeed confusing. |
Definitely don't read too much into the version number. All of the Razor code in the C# extension, regardless of version, is built from the main branch in this repo. There aren't any external Razor dependencies we're bringing in that get major changes, that are hidden from view or anything like that. In fact the entire bump from v7 to v9 can be seen in this PR here: https://github.com/dotnet/razor/pull/10320/files#diff-1ea18ff65faa2ae6fed570b83747086d0317f5e4bc325064f6c14319a9c4ff67R16 Why was there no v8? Essentially because we forgot. We tried to go to v8, to keep things lined up neatly, but something broke deep inside VS, and we had to go back to v7. For the .NET runtime, there are a bunch of smart people who think very carefully about versioning strategies, and naming of packages etc. For the Razor IDE team, we're just half a dozen people in a trenchcoat pretending to know what we're doing 😁 |
It's not so much the naming or the version number, I just noticed that in the release notes for the version of the C# extension, where all of these console errors and incorrect reporting of "errors" in the code happened, (2.13.17) has this change: dotnet/roslyn#73817, with this commit dotnet/roslyn@6a1688a This tells me that the C# extension is using the .Net 9 code, and that is where the problem stems from. So, it seems, something in the Razor 9.0.0-preview.24281.3 is causing errors in the C# extension. thanks. Just trying to help get this fixed, as I have to revert the C# extension to 2.33.13 in order to get proper functionality. |
Well, I'm not sure what's going on now. I'm now seeing these errors back to the "good" version I was using (2.33.17). Went to an even older version (2.31.19) and still seeing the errors. This is causing all sorts of intellisense errors and mis-marked errors. FYI C# Dev Kit is at the current version (1.8.10) |
I can confirm that it is still broken :-(. Please fix. |
@dibarbet I hit this trying to add a completion integration test for Razor. I pushed my branch https://github.com/dotnet/vscode-csharp/tree/dev/alexgav/CompletionIntegrationTest . That test reproes the issue about 80% of the runs. (Once in a while it passes without hitting the issue). I am blocked by this as I can't add this test. The issue is hit while I'm waiting for completion items to be available (while tag helper discover is happening) |
As of VSCode Insiders and C# Extension 2.41.26 This is STILL occurring, completely spamming the dev console with the
Any progress? Again, it started with the C# extension stated being built with .Net 9 Preview SDK. |
As mentioned in other bug reports that I filed or already replied to: I'm getting this in a non-Aspire plain old ASP.NET MVC project, using It's absolute madness and it's making VSCode basically a total no-go for working on any project that contains anything that makes use of Razor. The fact that this has yet to be addressed since the issue was filed back in June is ... well, let's just say: more than disappointing, and keep it polite. 😒 |
This should be fixed in the latest release. You may still see errors, but they are recoverable errors. If you are seeing product issues let us know. If the errors in the dev console are too verbose you can turn the logging to |
Type: Bug
Issue Description
C# Extension is filing the error console with exception messages.
Steps to Reproduce
Launch VS Code with a .Net project. Look in Developer Console.
Expected Behavior
No Errors
Actual Behavior
Lots of errors.
Logs
C# log
C# LSP Trace Logs
Environment information
VSCode version: 1.90.0
C# Extension: 2.34.10
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.301 Commit: 1a0e9c0300 Workload version: 8.0.300-manifests.6cb9d875 MSBuild version: 17.10.4+10fbfbf2eRuntime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.301\
.NET workloads installed:
[aspire]
Installation Source: VS 17.10.35004.147, VS 17.11.35005.142
Manifest Version: 8.0.0/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0\WorkloadManifest.json
Install Type: Msi
Host:
Version: 8.0.6
Architecture: x64
Commit: 3b8b000a0e
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.131 [C:\Program Files\dotnet\sdk]
6.0.321 [C:\Program Files\dotnet\sdk]
6.0.423 [C:\Program Files\dotnet\sdk]
7.0.120 [C:\Program Files\dotnet\sdk]
7.0.317 [C:\Program Files\dotnet\sdk]
7.0.410 [C:\Program Files\dotnet\sdk]
8.0.106 [C:\Program Files\dotnet\sdk]
8.0.206 [C:\Program Files\dotnet\sdk]
8.0.300 [C:\Program Files\dotnet\sdk]
8.0.301 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.30 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.31 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
Extension version: 2.34.10
VS Code version: Code 1.90.0 (89de5a8d4d6205e5b11647eb6a74844ca23d2573, 2024-06-04T19:33:54.889Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
canvas_oop_rasterization: enabled_on
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: