CsWinRT icon indicating copy to clipboard operation
CsWinRT copied to clipboard

[Diagnostics] Check against WindowsRuntimeType attribute when checking types

Open j0shuams opened this issue 3 years ago • 0 comments

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.

j0shuams avatar Jan 04 '21 22:01 j0shuams