Skip to content

Commit c88dbd3

Browse files
authored
Suppress Obsolete warnings in the ComInterfaceGenerator (#88859)
1 parent ddbce91 commit c88dbd3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libraries/System.Runtime.InteropServices/gen/ComInterfaceGenerator/ComInterfaceGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
169169

170170
using StringWriter source = new();
171171
source.WriteLine("// <auto-generated />");
172+
source.WriteLine("#pragma warning disable CS0612, CS0618"); // Suppress warnings about [Obsolete] member usage in generated code.
172173
interfaceInfo.WriteTo(source);
173174
// Two newlines looks cleaner than one
174175
source.WriteLine();

0 commit comments

Comments
 (0)