Reproduction steps:
1. Open the attached project “CS8032_Warning”
2. Open Edit > Preferences > External Tools
3. Set External Script Editor to Microsoft Visual Studio 2022
4. In the Project window create a new C# Script
5. Open the newly created script
6. Observe the Error List
Expected result: There are no warnings
Actual result: Multiple CS8032 warnings are printed
Reproducible with: 2022.2.0a14, 2022.2.17f1, 2023.1.0b14, 2023.2.0a13
Not reproducible with: 2020.3.47f1, 2021.3.24f1, 2022.2.0a13
Reproducible on: Windows 10
Not reproducible on: macOS 13.3.1 (M1, Visual Studio for Mac 17.5.4 (build 8))
Notes:
Warnings do not appear when using Rider or older Visual Studio versions
It might take a couple of seconds for Warnings to appear
Reproducible with newly created projects