Support for source generators
See original GitHub issueIssue Type: Bug
.Net team introduced source generators and OmniSharp doesn’t work correctly with them.
I enabled Analyzers in VS Code and this works well. After I added a source generator to a project Intellisense doesn’t work in the source generator file and I see errors in log.
[warn]: OmniSharp.Roslyn.CSharp.Workers.Diagnostics.AnalyzerWorkQueue
Timeout before work got ready for foreground analysis queue. This is assertion to prevent complete api hang in case of error.
[fail]: OmniSharp.MSBuild.ProjectManager
Failure while loading the analyzer reference 'TypeCatalogGenenerator': Could not load file or assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
[warn]: OmniSharp.Roslyn.CSharp.Workers.Diagnostics.AnalyzerWorkQueue
Timeout before work got ready for foreground analysis queue. This is assertion to prevent complete api hang in case of error.
[warn]: OmniSharp.Roslyn.CSharp.Workers.Diagnostics.AnalyzerWorkQueue
Timeout before work got ready for foreground analysis queue. This is assertion to prevent complete api hang in case of error.
It seems OmniSharp run the source generator like an analyzer although it shouldn’t have to.
Extension version: 1.23.6 VS Code version: Code 1.51.1 (e5a624b788d92b8d34d1392e4c4d9789406efe8f, 2020-11-10T23:34:32.027Z) OS version: Windows_NT x64 10.0.18363
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i5-2410M CPU @ 2.30GHz (4 x 2295) |
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: unavailable_off opengl: enabled_on protected_video_decode: unavailable_off rasterization: unavailable_off skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 3.91GB (0.53GB free) |
Process Argv | –crash-reporter-id a4f7808b-f735-44a7-add9-c658fbcfd849 |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Source Generators | Microsoft Learn
Source Generators is a C# compiler feature that lets C# developers inspect user code as it is being compiled. Source generators create new ......
Read more >Improved Support for Source Generators in ReSharper ...
Source generators are a fantastic tool that allows you to generate code at compile-time. For example, you can use generators to extend every ......
Read more >Support Source Generators · Issue #864 - GitHub
Support Source Generators Add support similar to C# Source Generators The idea is to execute the compiler in two passes: Pass 1 Parse...
Read more >Source generator updates: incremental generators
In this post I look at the updates to the source generator API in . ... Part 5 - Supporting EF Core migrations...
Read more >Source generator support - LINQPad Forum
will source generators be integrated in Linqpad? eg. stronginject or System.Text.Json.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
They will be in the next release of the vscode extension, I believe.
https://github.com/OmniSharp/omnisharp-vscode/pull/5339 will add support for find-references when the result exists in a generated file. Features in the generated files themselves (such as find references, outline viewer, etc) need work to be enabled.