microsoft / vscode-dotnettools

This is a feedback repository to capture issues logged for the C# Dev Kit and related extensions from Visual Studio Code
Other
221 stars 10 forks source link

C# Dev Kit is not showing compile errors-stale sln file #1083

Open mikekistler opened 4 months ago

mikekistler commented 4 months ago

Type: Bug

For me, I can't not reproduce this. I am seeing no "squigglies" from compile errors in my C# projects even though the project fails to build for simple reasons.

Extension version: 1.4.29 VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:43:08.196Z) OS version: Darwin arm64 23.4.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 24)| |GPU Status|2d_canvas: enabled
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
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|2, 2, 2| |Memory (System)|32.00GB (0.12GB free)| |Process Argv|. --crash-reporter-id 419d896f-7e85-4c21-8845-5a77abdaec9d| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 ccp2r6:30993542 dsvsc020:30976470 pythonait:31006305 666c4381:30973075 gee8j676:31009558 chatpanelt:31018789 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31022790 ```
arkalyanms commented 4 months ago

Parking on David in this repo until we can gather logs and move. @dibarbet note this is darwin arm64.

mikekistler commented 4 months ago

I learned from a colleague that I was not getting errors or intellsense is because my project was not referenced in the sln file in the root of the repo. I did not realize that this was a requirement of C# DevKit. Is this clearly documented somewhere that I missed?

arkalyanms commented 4 months ago

Moving to solution area based on latest comment. This might be converted into a documentation bug.

lifengl commented 4 months ago

Hey, @mikekistler , the C# Dev Kit only processes and works with the set of projects in the solution file opened (you might select to open different .sln file, if you have more than one, but only one would be used in a session.)

In the case a project is missing in the .sln file, is this solution file auto-created by the tool or it is created/maintained by developers who work in the repo?

mikekistler commented 4 months ago

I think users would benefit from having this information spelled out more clearly in the documentation.

In my particular case, I was working in a directory where I have many different, mostly unrelated projects within subdirectories. There was a solution file but I didn't see the point of adding my project to it because I would never build it that way. But now that I know the extension needs it to be there I've added it and things are working.

lifengl commented 4 months ago

thanks @mikekistler, that conformed what I guessed. The .sln file generated by the extension got staled. Ideally, the extension doesn't need the file in the first place. If it does have to, it should maintain it automatically, instead of leaving a new responsibility to developers to maintain something they don't need in the first place.

webreidi commented 1 month ago

@lifengl is this still being addressed? Does it need to move forward to the August milestone?