From bcf8544943ceb2d52203478b4870e4071a5ae958 Mon Sep 17 00:00:00 2001 From: Prashanth Govindarajan Date: Tue, 7 Sep 2021 13:05:37 -0700 Subject: [PATCH] Suppress CA2252 related warnings --- 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;