Skip to content

[ComInterfaceGenerator] COM interface methods decorated with ObsoleteAttribute generate CS0612 warnings #88813

@lordmilko

Description

@lordmilko

Attempting to compile the following

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("7DAC8207-D3AE-4C75-9B67-92801A497D44")]
[GeneratedComInterface]
public partial interface IFoo
{
    [Obsolete]
    void Foo();
}

Generates a warning warning CS0612: 'IFoo.Foo()' is obsolete

Other source generators in the runtime explicitly disable CS0612 and CS0618 obsolete warnings in their generated output. I would imagine the same should be done in the files emitted by the COM source generator

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions