-
Notifications
You must be signed in to change notification settings - Fork 685
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
CodeAnalysis has stopped working #6718
Comments
Please attach the O# logs - generally this is a sign that the project did not load correctly. |
Ah sorry! Didn't realize I had to manually add the log outputs when using the helper tool. My bad. Here you go: OmniSharp Log
Starting OmniSharp server at 06/12/2023, 10:01:49
Target: /Users/sigmundur/code/projectname
|
+1 running into the same issue. Happened after upgrading to .net8 |
Now that you mention it @UliPlabst , the issue also appeared for me after upgrading my project to .net8. I just tried going back to an older project running .net7, and everything works perfectly again. So it appears it atleast has something to do with .net8 |
this issue might be related, at least it seems like the same exception broke another project while moving to .net8. |
Ok so this was driving me crazy and so I experimented quite a bit and I now found a workaround. This this issue mentions that the issue does not exist in class library projects. Then I read this page.
So I think it has something to do with analyzers being enabled by default but not in .net standard projects. <PropertyGroup>
<RunAnalyzersDuringBuild>false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>false</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup> and Omnisharp code actions are working again. |
@UliPlabst That workaround seems to have worked! :D I'd still like to see an actual fix for whatever this weird issue is, but for now this will work 👍 |
Happy new year @dibarbet ! Just wondering if you have any updates on this? |
@JoeRobich this looks like it might be fixed by #6771 - error seems to be
thoughts? |
Yes, this should be fixed with the new version of OmniSharp as it now includes the AspNetCore EA library. If you need this fix prior to when a new version of the C# extension is released, you can set the |
Thanks Joey! I'll resolve this issue then - it should be fixed in next weeks release. |
Have been dealing with this for months!! You are a legend. I am curious, how does turning off analyzers fix the issue?!?! |
Type: Bug
Issue Description
All codecompletions/suggestions are not working anymore.
VSCode is saying that "The type could not be found" or that a "Collection initialization can be simplified" etc. But upon pressing "CMD + ." Omnisharp gives lots of Microsoft.CodeAnalysis.ExternalAccess.AspNetCore errors instead of showing fixes and suggestions.
Steps to Reproduce
Expected Behavior
Actual Behavior
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.85.0-insider
C# Extension: 2.12.19
Using OmniSharp: true
Mono Information
Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable.Dotnet Information
.NET SDK: Version: 8.0.100 Commit: 57efcf1350 Workload version: 8.0.100-manifests.6c33ef20Runtime Environment:
OS Name: Mac OS X
OS Version: 13.2
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/8.0.100/
.NET workloads installed:
Workload version: 8.0.100-manifests.6c33ef20
There are no installed workloads to display.
Host:
Version: 8.0.0
Architecture: arm64
Commit: 5535e31a71
.NET SDKs installed:
6.0.101 [/usr/local/share/dotnet/sdk]
6.0.202 [/usr/local/share/dotnet/sdk]
6.0.300 [/usr/local/share/dotnet/sdk]
7.0.203 [/usr/local/share/dotnet/sdk]
8.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0-rc.1.23421.29 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0-rc.1.23419.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
x64 [/usr/local/share/dotnet/x64]
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.12.19
VS Code version: Code - Insiders 1.85.0-insider (94a3d7bac770b43ce97e9685715bef1a60d1a759, 2023-12-01T19:01:14.317Z)
OS version: Darwin arm64 22.3.0
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
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: