THRIFT-5780 Prevent certain warnings related to net8
Client: netstd
Patch: Jens Geyer

This closes #2965
diff --git a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
index 6e46454..c16a069 100644
--- a/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_netstd_generator.cc
@@ -2019,6 +2019,8 @@
     // empty annotation values end up with "1" somewhere, ignore these as well
     if ((iter->second.back().length() > 0) && (iter->second.back() != "1")) {
       out << "(" << make_csharp_string_literal(iter->second.back()) << ")";
+    } else {
+      out << "(" << make_csharp_string_literal("This code is deprecated.") << ")";  // generic message to prevent CA1041
     }
     out << "]" << '\n';
   }
diff --git a/lib/netstd/Thrift/Transport/Client/THttpTransport.cs b/lib/netstd/Thrift/Transport/Client/THttpTransport.cs
index 1ab1caf..e724665 100644
--- a/lib/netstd/Thrift/Transport/Client/THttpTransport.cs
+++ b/lib/netstd/Thrift/Transport/Client/THttpTransport.cs
@@ -25,6 +25,8 @@
 using System.Threading;
 using System.Threading.Tasks;
 
+#pragma warning disable IDE0079  // unneeded suppression -> all except net8
+#pragma warning disable IDE0301  // simplify collection init -> net8 only
 
 namespace Thrift.Transport.Client
 {