CsWinRT
CsWinRT copied to clipboard
[Diagnostics] Check against WindowsRuntimeType attribute when checking types
This issue is related to the diagnostic work in the cswinrt source generator, used for component authoring. Today we check for invalid types, but there could be a valid, non-WinRT type used that goes unnoticed. We should block it as invalid.
For example, if someone uses System.Version, which does not have a custom mapping we would need to block it. Or, if someone references another dotnet library that does not use CsWinRT.
For most things, add a check like this would help.
When the type is also authored in c# it won't have the attribute, so we need to check to see if it has a "ABI.Impl" type, or something else altogether.