Port FxCop rule CA1405: ComVisibleTypeBaseTypesShouldBeComVisible #421
Labels
Approved-Rule
Indicates if the new proposed rule has been approved to move to implementation phase
FxCop-Port
help wanted
The issue is up-for-grabs, and can be claimed by commenting
Priority:3
Nice to have (suitable for disabled by default rules and ported FxCop rules)
Milestone
Title: COM visible type base types should be ComVisible
Description:
When a COM visible type adds members in a new version, it must abide by strict guidelines to avoid breaking COM clients that bind to the current version. A type that is invisible to COM presumes it does not need to adhere to these COM versioning rules when it adds new members. However, if a COM visible type derives from the COM invisible type and exposes a class interface of ClassInterfaceType.AutoDual or AutoDispatch (the default), all public members of the base type (unless they are specifically marked as COM invisible, which would be redundant) are exposed to COM. If the base type adds new members in a subsequent version, any COM clients that bind to the class interface of the derived type might break. COM visible types should derive only from COM visible types to reduce the possibility of breaking COM clients.
Dependency: None
Notes:
The text was updated successfully, but these errors were encountered: