You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Review COM interface declarations for conflicting ComImport/ComVisible attributes #1860
There are several interfaces declared with both [ComImport] and [ComVisible(true)] - this is wrong, ComVisible(true) is only for interfaces owned by the assembly. It probably had little consequence while WPF was part of Desktop Framework, but now that it can be deployed with the application these should be corrected, otherwise you risk people corrupting the registry entries owned by Windows.
There probably should be a general review of all ComVisible(true) attributes to make sure annotated classes/code is actually owned by WPF and not just imported. Imported classes/interfaces should use ComImport attributes. A quick search finds 63 matches in 47 files, most in automation, I don't know if those are correct and WPF actually owns them, or if they should be imported instead.
Those should all be only ComImport without a ComVisibile, since they are owned by the OS. Having someone attempt to run WPF assemblies deployed with his application through regasm or equivalent tooling (e.g. during an installer) would overwrite the OS registration of those interfaces.
Activity