It's basically [this issue](https://github.com/microsoft/CsWinRT/issues/646), but it only happens when I replace `[ComImport]` with `[GeneratedComInterface]`. **Describe the bug** Given ```csharp [GeneratedComInterface] [Guid("5B0D3235-4DBA-4D44-865E-8F1D0E4FD04D")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] public unsafe partial interface IMemoryBufferByteAccess { void GetBuffer(out IntPtr buffer, out uint capacity); } ``` Attempting to convert `IMemoryBufferReference reference` to `IMemoryBufferByteAccess` fails with > System.InvalidCastException: 'Invalid cast from 'WinRT.IInspectable' to 'ChatGPT.Platforms.Windows.Core.IMemoryBufferByteAccess'.' **To Reproduce** See the [linked issue](https://github.com/microsoft/CsWinRT/issues/646) 1. `IMemoryBufferReference reference = ...` 2. `reference.As<IMemoryBufferByteAccess>()` **Expected behavior** Should get `IMemoryBufferByteAccess` **Version Info** .NET SDK 8.0 - net8.0-windows10.0.22621.0 **Additional context**