Question

I am having difficulty with resolving C# compiler warnings when using an assembly alias in a cref link. Unfortunately, the only feedback that I get from intellisense is 'Syntax error'. Here is an example of the link [see cref="global::Namespace.Class.Method"]. From what I can gather, the syntax is correct. The assembly being referenced has 'global' set for the alias.

Is this an issue with the compiler? Is there a work-around?

Was it helpful?

Solution

As far as I'm aware, global has the same meaning in documentation comments as in normal code. It's just a namespace alias which allows you to avoid conflicts between namespace names and type names. See MSDN on the Global Namespace Alias for more details.

Note that this isn't the same as extern aliases which are used when you have two types with the same fully-qualified names, in different assemblies. Your question talking about "different roots" suggests you might be getting confused with extern aliases, but it's hard to know for sure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top