From 876417a68d5102d3be9abbf886ee097feedcff9d Mon Sep 17 00:00:00 2001 From: Marek Habersack Date: Tue, 29 Nov 2022 18:20:52 +0100 Subject: [PATCH] [build] Hush a couple of code analyzer warnings for Mono.Android Building our repo generates around 3400 warnings per single .NET build, similar to: warning CA1416: This call site is reachable on: 'Android' 21.0 and later. 'Double' is only supported on: . warning CA1422: This call site is reachable on: 'Android' 21.0 and later. 'Double' is obsoleted on: 'Android' 33.0 and later. Since printing each message to the console needs to be synchronized, that means the build might be slower than necessary, since we generate over 10k of these messages per CI build. Disable the warnings by default. They can be enabled by setting the `$(_EnableCodeAnalyzerPlatformWarnings)` MSBuild property to any value. --- src/Mono.Android/Mono.Android.csproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mono.Android/Mono.Android.csproj b/src/Mono.Android/Mono.Android.csproj index 7aa07301a58..f11627b174a 100644 --- a/src/Mono.Android/Mono.Android.csproj +++ b/src/Mono.Android/Mono.Android.csproj @@ -43,6 +43,10 @@ $(NoWarn);CS1572;CS1573;CS1574;CS1584;CS1587;CS1591;CS1658; + + $(NoWarn);CA1422;CA1416 + + $([System.IO.Path]::GetFullPath ('$(OutputPath)$(AssemblyName).dll'))