From 74201f313bf10a4bbcf64d1dbdecbd66ff65e7b9 Mon Sep 17 00:00:00 2001 From: Prashanth Govindarajan Date: Wed, 8 Sep 2021 10:45:43 -0700 Subject: [PATCH] Suppress CA2252 related warnings (#7846) --- src/Microsoft.DotNet.GenFacades/SourceGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.DotNet.GenFacades/SourceGenerator.cs b/src/Microsoft.DotNet.GenFacades/SourceGenerator.cs index f7014698b41..b34212138a4 100644 --- a/src/Microsoft.DotNet.GenFacades/SourceGenerator.cs +++ b/src/Microsoft.DotNet.GenFacades/SourceGenerator.cs @@ -47,7 +47,7 @@ public bool GenerateSource( StringBuilder sb = new StringBuilder(); sb.AppendLine("// "); // Adding this because the following code is autogenerated. - sb.AppendLine("#pragma warning disable CS0618"); // Adding this to avoid warnings while adding typeforwards for obselete types. + sb.AppendLine("#pragma warning disable CS0618,CA2252"); // Adding this to avoid warnings while adding typeforwards for obselete types. CA2252 suppresses warnings on preview APIs bool result = true;