-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Runtime.InteropServicesin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
Description
When using [GeneratedComInterface] with ComInterfaceOptions.ManagedObjectWrapper, the generator emits an empty interface declaration with [DynamicInterfaceCastableImplementation], which then produces a warning:
Reproduction Steps
[Guid("7448E99B-0904-4B6A-9CC2-51DD9A71032A")]
[GeneratedComInterface(Options = ComInterfaceOptions.ManagedObjectWrapper)]
public partial interface IFoo
{
void Foo();
}Expected behavior
No build warnings or errors.
Actual behavior
"Microsoft.Interop.ComInterfaceGenerator\IFoo.cs(12,31,12,54): warning CA2256: Type 'InterfaceImplementation' has the 'DynamicInterfaceCastableImplementationAttribute' applied to it but does not provide an implementation of all interface members defined in inherited interfaces (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2256)"
Regression?
No, it's a new feature.
Configuration
- VS 17.8 Preview 1
- .NET 8.0.100-rc.2.23421.16
- Roslyn 4.8.0-1.23377.4 (692d17e9)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Runtime.InteropServicesin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Type
Projects
Status
No status
