Right now we have some odd code which works to extract the path of an analyzer reference out of the canonical name of the node; which can lead to bugs like #50317. But:
Originally posted by @drewnoakes in #50553 (comment)
Yes, since 16.7 we simplified the identifiers used on dependencies such as this to remove the target framework and dependency "type" (e.g. analyzerdependency) from these strings. I believe the final checks here (and corresponding test code) can be removed, though it may break compatibility with earlier SDK versions. You may like to test with earlier SDKs to be sure.
We should do such a test and remove it.