Open tom-dudley opened 7 years ago
This is a duplicate of https://github.com/dotnet/roslyn/issues/11462 which itself is a duplicate of https://github.com/dotnet/roslyn/issues/11378
Closing.
Re-opened since apparently the root issue, https://github.com/dotnet/roslyn/issues/11378 was fixed, but I'm still getting this in VS 2017.
Perhaps someone could clarify, does Build + IntelliSense
mean the intersection of the two sets? So the reason I'm not seeing the error on Build + IntelliSense
is that the IntelliSense squiggles aren't working?
If this is the case, is this still a Roslyn / Microsoft issue, or is it handled by a user setting / analyzer package? As far as I'm aware, whenever a cs
file is open, and the corresponding project has analyzers with some rules set to error, then any violations of that rule (in open files) should get picked up by IntelliSense. This should happen out of the box, regardless of the analyzer used and without having to configure any settings.
I too face this critical bug in VS2017. For me, it was a lack of casting a parameter of type dynamic to the type expected by the method. It seems to be reproducible since I rebuilt a bunch of times and restarted VS. After restart the error shortly appeared on the normal "Build + Intellisense" list but then disappeared. Switching to "Build Only" shows the error. Adding the cast made the project build again.
Wasted almost a day due to this issue !! Founded out this issue at last from stackoverflow, kindly fix it ASAP !
@mavasani do you know what's going o here? I think i've also run into this occasionally? Maybe some sort of race between listening to build events and whatever solution crawler is producing?
@CyrusNajmabadi There could be multiple reasons:
Unfortunately, there is no easy way to tackle this problem other then work off each repro. Also tagging @vatsalyaagrawal as we discussed issues in this space a bit today.
This seems fixed now in 17.3.0 and maybe was already in 17.2.5
Unfortunately this issue still exists in VS 17.5.1. Actually, sometimes the missing warnings do pop-up for a short time, only to disappear after a few seconds. I've only noticed this issue with RSnnnn code warnings.
We see it in F# too (which uses Roslyn's ExternalAccess to report live, document diagnostics). Is there a workaround for it, we can implement?
https://github.com/shaneharper/Visual_Studio_Warning_Not_Shown_In_Error_List is a very small project that demonstrates that Build + IntelliSense isn't always the union of the results on the Build option and the IntelliSense option.
Note that the unexpected behaviour occurs only when the source file for which a compiler warning is generated was open in an editor window at the time it was compiled.
I've observed this happening with Visual Studio 2022 v17.5.4 and with v17.10.5. I've reported it here: https://developercommunity.visualstudio.com/t/Error-List:-Build--IntelliSense-pane/10712993.
The above happens after a failed build. The
Output
pane correctly gives the project and analyzer ID.Version Used: I can reproduce this issue with both Visual Studio 2015
14.0.25431.01 Update 3
and Visual Studio 201715.0.0+26228.10
Steps to Reproduce: Unfortunately I can't reliably reproduce this (sometimes the errors do appear in
Build + IntelliSense
). I'm encountering it while running some SonarLint rules. The rule is available here. The class violating the rule is part of a WinForms application.If someone can provide some steps to take to try and nail down a repro I'd be happy to help.
Expected Behavior:
Build + IntelliSense
is the union of the results on theBuild
option and theIntelliSense
option.Actual Behavior:
Build
shows an analyzer error.Build + IntelliSense
does not.