|Have you considered creating your own [HighlightedClass] stub attribute in the correct namespace that could be used as a stand-in reference in the other project?
It would just need to be compile compatible with the real class.
Or possibly even it is compiled as a source only attribute in one context…
This leads to a scenario where you might want the same source to be shared across two different projects so it can be compiled two different ways?
Or use it as a binary dependency? You have 2 versions of a DLL?