MFTV0006: Add an explicit tag to disambiguate the conventional tag
editCause
This rule is only reported when the naming conventions are enabled.
The convention tags a member named Id with the name of its type. When two types have the same name in different namespaces, their ids get the same tag, and the analyzer cannot tell them apart:
public sealed class Order
{
public Guid Id { get; set; } // MFTV0006
}public sealed class Order
{
public Guid Id { get; set; } // MFTV0006
}The rule is reported on each member:
property 'Sample.NamingConventions.Billing.Order.Id' and property 'Sample.NamingConventions.Sales.Order.Id' both infer the tag 'OrderId' from their type name; add an explicit [ValueTag] with a distinct tag to at least one of themHow to fix
Add an explicit [ValueTag] with a distinct tag to at least one of the members, for instance [ValueTag("BillingOrderId")] on Billing.Order.Id. Explicit tags always win over the conventions.