Steps to reproduce:
xunit.analyzersAnalyzers nodeAnalyzers node appears with unresolved child, which is a full path rather than the analyzer's name
Analyzers node is missing againOpen questions:
Analyzers node not initially present? This seems to happen if the build before opening the solution happened within VS.As part of fixing this, add coverage of analyzers to the integration tests.
Some notes to capture findings of investigations.
(EDIT removed incorrect git bisect log as I'd misidentified the good commit)
FYI still repros in 16.3.1 when working with ASP.NET Core projects:

This is potentially caused by metadata filtering in the DTB cache for task items. From the (internal) ProjectServices repo:
MSBuild throws exceptions when we access path related properties on non-path items.
We try to prevent running into such frequent exceptions by detecting some common invalid path patterns.
This filtering applies when writing the cache, which fits with the above repro steps. My current hunch is that data needed by the Analyzers node is being filtered out by the cache, but this needs further investigation.
Paths are shown for unresolved analyzer references:
EDIT: This is a red herring. Roslyn creates the full _Analyzers_ node for legacy projects, but for this project system it only populates diagnostic items. We have similar logic however:
This can be reproduced more easily by:
Deleting the .dtbcache file in the .vs folder between steps 2 and 3 fixes the problem, so the DTB caching in ProjectServices is looking like the culprit here.
EDIT The above worked for me five times in a row, but no longer does. It doesn't seem that deterministic. Running VS in the debugger makes it fail more often. Right now I'm Ctrl+F5'ing and can't repro it at all.
@drewnoakes really appreciate the persistence on this 馃憤
@drewnoakes post helped me out! Thank you!
Getting closer. This appears to be a race condition. If the VS instance is 'warm' (has previously had a solution open) then the problem triggers. The presence of the DTB cache factors in to the sequence of events, as it's much faster to read the cache than do a DTB. It also explains why using the debugger hasn't been helpful, as that changes timing too. I'm going to add some tracing to dig deeper.
This has been fixed and will be released in 16.5.
could be but 16.5 is not out yet
This has been fixed and will be released in 16.5.
I just updated Visual studio to 16.4.4 and the issue was resolved.
The reference is fixed and no more yellow triangle.
Thanks.
@keserwan glad it's working for you, but the fix is not present in that build. It will be in 16.5, and most likely in a preview.
I fixed this error by deleting the solution's .vs folder along with all bin and obj folders in all subprojects. All of these of course while VS was not running.
@arphox Thanks alot. Your suggestion worked for me
That will work until the next reload of the solution, the fix is in 16.5.
Most helpful comment
This has been fixed and will be released in 16.5.