dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 671 forks source link

C# Compilation Errors Not Recognized Until File Opened #6677

Open arunchndr opened 11 months ago

arunchndr commented 11 months ago

From vscode-dotnettools created by lcompton: microsoft/vscode-dotnettools#401

Type: Bug

  1. Install Unity extension in VS Code
  2. Configure a Unity project to use VS Code per extension instructions
  3. Configure C# extension in VS Code such that both Dotnet Background Analysis settings are set to "fullSolution", do this for both User and Workspace
  4. Create severlal C# scripts one of which should contain compilation errors
  5. Close VS Code
  6. Open a working C# scipt from Unity

Actual Result Script with errors is not highlighted in red, until it is opened.

Expected Result Script name should be highlighted in red and errors should listed in "PROBLEMS"

Extension version: 0.9.0 VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z) OS version: Windows_NT x64 10.0.22621 Modes:

A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263cf:30792227 vscaat:30438848 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 vsccc:30803844 2e4cg342:30602488 f6dab269:30613381 showlangstatbar:30737416 a2ce3375:30757347 pythonfmttext:30731395 pythoncmvfstrcf:30756944 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 gsofa:30804715 pythonnosmt12:30797651 pythonidxptcf:30805731 pythonnoceb:30805159 dsvsc013:30795093 dsvsc014:30804076 diffeditorv2:30812749 ```
arunchndr commented 11 months ago

@jbevain would you please provide your non Unity repro for this?

jbevain commented 11 months ago

@arkalyanms, yep, but unfortunately I need to share it privately within Microsoft.