Open mavasani opened 3 years ago
Another feedback ticket for the same issue: https://developercommunity.visualstudio.com/t/Intellisense-continue-reporting-errors-a/1547853
Should also apply to all these warnings/errors?
I'm also wondering what were the reasons for live error to not support this?
Related to #24002
Reported again by a customer in https://github.com/dotnet/roslyn/issues/63164.
@BillWagner can we please add this documentation note for CS0169 first? Multiple users have now reported this issue for this ID.
Reported again by a customer in https://developercommunity.visualstudio.com/t/Showing-suggestion-for-thing-that-is-no-/10150898, but for another build-only compiler diagnostic CS0649.
All the C# compiler error codes which are build-only diagnostics are listed here: https://github.com/dotnet/roslyn/blob/e263437db49b0650dbc72fca3331df654e05987c/src/Compilers/CSharp/Portable/Errors/ErrorFacts.cs#L531-L573 and will have the same behavior as CS0169. All the C# error codes are defined in this file.
We should update the documentation for all these error codes to add a note about them being build-only diagnostics.
Tagging @arkalyanms as an FYI. We have been receiving quite a few VS user feedback reports for stale compiler diagnostic squiggles/error list entries for build-only compiler diagnostics, that can only be refreshed with explicit build/rebuild command and not from background analysis.
Reported again by another customer at https://developercommunity.visualstudio.com/t/VS-2022-C-editor-has-gone-nuts/10162597.
Apart from this docs issue, I am also going to prioritize https://github.com/dotnet/roslyn/issues/64659.
CS0169 warning is reported by the compiler only during explicit "Build" or "Rebuild" operations, it does not get reported during typing in the IDE, i.e. as part of intellisense diagnostics. This means that if the user edits code such that it fixes the warning OR deletes the unused field, the warning still remains in the error list and the corresponding stale squiggle also persists until the user builds or rebuilds the project again.
As this behavior is different from majority of compiler warnings/errors, which automatically refresh while typing, it leads to lot of user confusion. We have had multiple feedback tickets, such as https://developercommunity.visualstudio.com/t/CS0169-Warnings-do-not-vanish-after-prob/1551348, and adding this note to the doc page for this warning will likely help. We can also point to this documentation note while resolving such feedback tickets.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.