diff --git a/src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs b/src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs index 569d329a3c2ca..2c6c096f04f26 100644 --- a/src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs +++ b/src/Compilers/Core/Portable/PEWriter/MetadataWriter.cs @@ -4,6 +4,10 @@ #nullable disable +// We're not actually doing formatter-based serialization in this file. +// We're simply propagating along the attributes of symbols we are emitting to metadata. +#pragma warning disable SYSLIB0050 // 'FieldAttributes.NotSerialized' is obsolete: 'Formatter-based serialization is obsolete and should not be used.' + using System; using System.Collections.Generic; using System.Collections.Immutable;