From 330b66afe08dd18aa426df42f83e915010768d44 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Nov 2026 18:53:02 +0000 Subject: [PATCH 1/2] Initial plan From 3adc56e31f53fc506e3562f280f8f43faadd804e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Nov 2026 19:12:42 +0000 Subject: [PATCH 2/2] Apply remaining changes Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../core-libraries/11/obsolete-apis.md | 7 +- docs/core/project-sdk/msbuild-props.md | 10 +- docs/fundamentals/code-analysis/overview.md | 50 +++++++-- .../code-analysis/quality-rules/ca1000.md | 4 +- .../code-analysis/quality-rules/ca1001.md | 4 +- .../code-analysis/quality-rules/ca1002.md | 4 +- .../code-analysis/quality-rules/ca1003.md | 4 +- .../code-analysis/quality-rules/ca1005.md | 4 +- .../code-analysis/quality-rules/ca1008.md | 4 +- .../code-analysis/quality-rules/ca1010.md | 4 +- .../code-analysis/quality-rules/ca1012.md | 4 +- .../code-analysis/quality-rules/ca1014.md | 4 +- .../code-analysis/quality-rules/ca1016.md | 4 +- .../code-analysis/quality-rules/ca1017.md | 4 +- .../code-analysis/quality-rules/ca1018.md | 4 +- .../code-analysis/quality-rules/ca1019.md | 4 +- .../code-analysis/quality-rules/ca1021.md | 4 +- .../code-analysis/quality-rules/ca1024.md | 4 +- .../code-analysis/quality-rules/ca1027.md | 4 +- .../code-analysis/quality-rules/ca1028.md | 4 +- .../code-analysis/quality-rules/ca1030.md | 4 +- .../code-analysis/quality-rules/ca1031.md | 4 +- .../code-analysis/quality-rules/ca1032.md | 4 +- .../code-analysis/quality-rules/ca1033.md | 4 +- .../code-analysis/quality-rules/ca1034.md | 4 +- .../code-analysis/quality-rules/ca1036.md | 4 +- .../code-analysis/quality-rules/ca1040.md | 4 +- .../code-analysis/quality-rules/ca1041.md | 4 +- .../code-analysis/quality-rules/ca1043.md | 4 +- .../code-analysis/quality-rules/ca1044.md | 4 +- .../code-analysis/quality-rules/ca1045.md | 4 +- .../code-analysis/quality-rules/ca1046.md | 4 +- .../code-analysis/quality-rules/ca1047.md | 4 +- .../code-analysis/quality-rules/ca1050.md | 4 +- .../code-analysis/quality-rules/ca1051.md | 4 +- .../code-analysis/quality-rules/ca1052.md | 4 +- .../code-analysis/quality-rules/ca1053.md | 4 +- .../code-analysis/quality-rules/ca1054.md | 4 +- .../code-analysis/quality-rules/ca1055.md | 4 +- .../code-analysis/quality-rules/ca1056.md | 4 +- .../code-analysis/quality-rules/ca1058.md | 4 +- .../code-analysis/quality-rules/ca1060.md | 4 +- .../code-analysis/quality-rules/ca1061.md | 4 +- .../code-analysis/quality-rules/ca1062.md | 4 +- .../code-analysis/quality-rules/ca1063.md | 4 +- .../code-analysis/quality-rules/ca1064.md | 4 +- .../code-analysis/quality-rules/ca1065.md | 4 +- .../code-analysis/quality-rules/ca1066.md | 4 +- .../code-analysis/quality-rules/ca1067.md | 4 +- .../code-analysis/quality-rules/ca1068.md | 4 +- .../code-analysis/quality-rules/ca1069.md | 4 +- .../code-analysis/quality-rules/ca1070.md | 4 +- .../code-analysis/quality-rules/ca1200.md | 4 +- .../code-analysis/quality-rules/ca1303.md | 4 +- .../code-analysis/quality-rules/ca1304.md | 4 +- .../code-analysis/quality-rules/ca1305.md | 4 +- .../code-analysis/quality-rules/ca1307.md | 4 +- .../code-analysis/quality-rules/ca1308.md | 4 +- .../code-analysis/quality-rules/ca1309.md | 4 +- .../code-analysis/quality-rules/ca1310.md | 4 +- .../code-analysis/quality-rules/ca1311.md | 4 +- .../code-analysis/quality-rules/ca1401.md | 4 +- .../code-analysis/quality-rules/ca1416.md | 4 +- .../code-analysis/quality-rules/ca1417.md | 4 +- .../code-analysis/quality-rules/ca1418.md | 4 +- .../code-analysis/quality-rules/ca1419.md | 4 +- .../code-analysis/quality-rules/ca1420.md | 4 +- .../code-analysis/quality-rules/ca1421.md | 4 +- .../code-analysis/quality-rules/ca1422.md | 4 +- .../code-analysis/quality-rules/ca1501.md | 4 +- .../code-analysis/quality-rules/ca1502.md | 4 +- .../code-analysis/quality-rules/ca1505.md | 4 +- .../code-analysis/quality-rules/ca1506.md | 4 +- .../code-analysis/quality-rules/ca1507.md | 4 +- .../code-analysis/quality-rules/ca1508.md | 4 +- .../code-analysis/quality-rules/ca1509.md | 4 +- .../code-analysis/quality-rules/ca1510.md | 4 +- .../code-analysis/quality-rules/ca1511.md | 4 +- .../code-analysis/quality-rules/ca1512.md | 4 +- .../code-analysis/quality-rules/ca1513.md | 4 +- .../code-analysis/quality-rules/ca1514.md | 4 +- .../code-analysis/quality-rules/ca1515.md | 4 +- .../code-analysis/quality-rules/ca1516.md | 4 +- .../code-analysis/quality-rules/ca1517.md | 81 ++++++++++++++ .../code-analysis/quality-rules/ca1700.md | 4 +- .../code-analysis/quality-rules/ca1707.md | 4 +- .../code-analysis/quality-rules/ca1708.md | 4 +- .../code-analysis/quality-rules/ca1710.md | 4 +- .../code-analysis/quality-rules/ca1711.md | 4 +- .../code-analysis/quality-rules/ca1712.md | 4 +- .../code-analysis/quality-rules/ca1713.md | 4 +- .../code-analysis/quality-rules/ca1714.md | 4 +- .../code-analysis/quality-rules/ca1715.md | 4 +- .../code-analysis/quality-rules/ca1716.md | 4 +- .../code-analysis/quality-rules/ca1717.md | 4 +- .../code-analysis/quality-rules/ca1720.md | 4 +- .../code-analysis/quality-rules/ca1721.md | 4 +- .../code-analysis/quality-rules/ca1724.md | 4 +- .../code-analysis/quality-rules/ca1725.md | 4 +- .../code-analysis/quality-rules/ca1727.md | 4 +- .../code-analysis/quality-rules/ca1801.md | 4 +- .../code-analysis/quality-rules/ca1802.md | 4 +- .../code-analysis/quality-rules/ca1805.md | 4 +- .../code-analysis/quality-rules/ca1806.md | 4 +- .../code-analysis/quality-rules/ca1810.md | 4 +- .../code-analysis/quality-rules/ca1812.md | 4 +- .../code-analysis/quality-rules/ca1813.md | 4 +- .../code-analysis/quality-rules/ca1814.md | 4 +- .../code-analysis/quality-rules/ca1815.md | 4 +- .../code-analysis/quality-rules/ca1816.md | 4 +- .../code-analysis/quality-rules/ca1819.md | 4 +- .../code-analysis/quality-rules/ca1820.md | 4 +- .../code-analysis/quality-rules/ca1821.md | 4 +- .../code-analysis/quality-rules/ca1822.md | 4 +- .../code-analysis/quality-rules/ca1823.md | 4 +- .../code-analysis/quality-rules/ca1824.md | 4 +- .../code-analysis/quality-rules/ca1825.md | 4 +- .../code-analysis/quality-rules/ca1826.md | 4 +- .../code-analysis/quality-rules/ca1827.md | 4 +- .../code-analysis/quality-rules/ca1828.md | 4 +- .../code-analysis/quality-rules/ca1829.md | 4 +- .../code-analysis/quality-rules/ca1830.md | 4 +- .../code-analysis/quality-rules/ca1831.md | 4 +- .../code-analysis/quality-rules/ca1832.md | 4 +- .../code-analysis/quality-rules/ca1833.md | 4 +- .../code-analysis/quality-rules/ca1834.md | 4 +- .../code-analysis/quality-rules/ca1835.md | 4 +- .../code-analysis/quality-rules/ca1836.md | 4 +- .../code-analysis/quality-rules/ca1837.md | 4 +- .../code-analysis/quality-rules/ca1838.md | 4 +- .../code-analysis/quality-rules/ca1839.md | 4 +- .../code-analysis/quality-rules/ca1840.md | 4 +- .../code-analysis/quality-rules/ca1841.md | 4 +- .../code-analysis/quality-rules/ca1842.md | 4 +- .../code-analysis/quality-rules/ca1843.md | 4 +- .../code-analysis/quality-rules/ca1844.md | 4 +- .../code-analysis/quality-rules/ca1845.md | 4 +- .../code-analysis/quality-rules/ca1846.md | 4 +- .../code-analysis/quality-rules/ca1847.md | 4 +- .../code-analysis/quality-rules/ca1848.md | 4 +- .../code-analysis/quality-rules/ca1849.md | 4 +- .../code-analysis/quality-rules/ca1850.md | 4 +- .../code-analysis/quality-rules/ca1851.md | 4 +- .../code-analysis/quality-rules/ca1852.md | 4 +- .../code-analysis/quality-rules/ca1853.md | 4 +- .../code-analysis/quality-rules/ca1854.md | 4 +- .../code-analysis/quality-rules/ca1855.md | 4 +- .../code-analysis/quality-rules/ca1856.md | 4 +- .../code-analysis/quality-rules/ca1857.md | 4 +- .../code-analysis/quality-rules/ca1858.md | 4 +- .../code-analysis/quality-rules/ca1859.md | 4 +- .../code-analysis/quality-rules/ca1860.md | 4 +- .../code-analysis/quality-rules/ca1861.md | 4 +- .../code-analysis/quality-rules/ca1862.md | 4 +- .../code-analysis/quality-rules/ca1863.md | 4 +- .../code-analysis/quality-rules/ca1864.md | 4 +- .../quality-rules/ca1865-ca1867.md | 4 +- .../code-analysis/quality-rules/ca1868.md | 4 +- .../code-analysis/quality-rules/ca1869.md | 4 +- .../code-analysis/quality-rules/ca1870.md | 4 +- .../code-analysis/quality-rules/ca1871.md | 4 +- .../code-analysis/quality-rules/ca1872.md | 4 +- .../code-analysis/quality-rules/ca1873.md | 4 +- .../code-analysis/quality-rules/ca1874.md | 4 +- .../code-analysis/quality-rules/ca1875.md | 4 +- .../code-analysis/quality-rules/ca1876.md | 99 +++++++++++++++++ .../code-analysis/quality-rules/ca1877.md | 4 +- .../code-analysis/quality-rules/ca1878.md | 4 +- .../code-analysis/quality-rules/ca2000.md | 4 +- .../code-analysis/quality-rules/ca2002.md | 4 +- .../code-analysis/quality-rules/ca2007.md | 4 +- .../code-analysis/quality-rules/ca2008.md | 4 +- .../code-analysis/quality-rules/ca2009.md | 4 +- .../code-analysis/quality-rules/ca2011.md | 4 +- .../code-analysis/quality-rules/ca2012.md | 4 +- .../code-analysis/quality-rules/ca2013.md | 4 +- .../code-analysis/quality-rules/ca2014.md | 4 +- .../code-analysis/quality-rules/ca2015.md | 4 +- .../code-analysis/quality-rules/ca2016.md | 4 +- .../code-analysis/quality-rules/ca2017.md | 4 +- .../code-analysis/quality-rules/ca2018.md | 4 +- .../code-analysis/quality-rules/ca2019.md | 4 +- .../code-analysis/quality-rules/ca2020.md | 4 +- .../code-analysis/quality-rules/ca2021.md | 4 +- .../code-analysis/quality-rules/ca2022.md | 4 +- .../code-analysis/quality-rules/ca2023.md | 4 +- .../code-analysis/quality-rules/ca2024.md | 4 +- .../code-analysis/quality-rules/ca2025.md | 4 +- .../code-analysis/quality-rules/ca2026.md | 4 +- .../code-analysis/quality-rules/ca2027.md | 103 ++++++++++++++++++ .../code-analysis/quality-rules/ca2028.md | 96 ++++++++++++++++ .../code-analysis/quality-rules/ca2100.md | 4 +- .../code-analysis/quality-rules/ca2101.md | 4 +- .../code-analysis/quality-rules/ca2109.md | 4 +- .../code-analysis/quality-rules/ca2119.md | 4 +- .../code-analysis/quality-rules/ca2153.md | 4 +- .../code-analysis/quality-rules/ca2200.md | 4 +- .../code-analysis/quality-rules/ca2201.md | 4 +- .../code-analysis/quality-rules/ca2207.md | 4 +- .../code-analysis/quality-rules/ca2208.md | 4 +- .../code-analysis/quality-rules/ca2211.md | 4 +- .../code-analysis/quality-rules/ca2213.md | 4 +- .../code-analysis/quality-rules/ca2214.md | 4 +- .../code-analysis/quality-rules/ca2215.md | 4 +- .../code-analysis/quality-rules/ca2216.md | 4 +- .../code-analysis/quality-rules/ca2217.md | 4 +- .../code-analysis/quality-rules/ca2218.md | 4 +- .../code-analysis/quality-rules/ca2219.md | 4 +- .../code-analysis/quality-rules/ca2224.md | 4 +- .../code-analysis/quality-rules/ca2225.md | 4 +- .../code-analysis/quality-rules/ca2226.md | 4 +- .../code-analysis/quality-rules/ca2227.md | 4 +- .../code-analysis/quality-rules/ca2229.md | 4 +- .../code-analysis/quality-rules/ca2231.md | 4 +- .../code-analysis/quality-rules/ca2234.md | 4 +- .../code-analysis/quality-rules/ca2235.md | 4 +- .../code-analysis/quality-rules/ca2237.md | 4 +- .../code-analysis/quality-rules/ca2241.md | 4 +- .../code-analysis/quality-rules/ca2242.md | 4 +- .../code-analysis/quality-rules/ca2243.md | 4 +- .../code-analysis/quality-rules/ca2244.md | 4 +- .../code-analysis/quality-rules/ca2245.md | 4 +- .../code-analysis/quality-rules/ca2246.md | 4 +- .../code-analysis/quality-rules/ca2247.md | 4 +- .../code-analysis/quality-rules/ca2248.md | 4 +- .../code-analysis/quality-rules/ca2249.md | 4 +- .../code-analysis/quality-rules/ca2250.md | 4 +- .../code-analysis/quality-rules/ca2251.md | 4 +- .../code-analysis/quality-rules/ca2252.md | 4 +- .../code-analysis/quality-rules/ca2253.md | 4 +- .../code-analysis/quality-rules/ca2254.md | 4 +- .../code-analysis/quality-rules/ca2255.md | 4 +- .../code-analysis/quality-rules/ca2256.md | 4 +- .../code-analysis/quality-rules/ca2257.md | 4 +- .../code-analysis/quality-rules/ca2258.md | 4 +- .../code-analysis/quality-rules/ca2259.md | 4 +- .../code-analysis/quality-rules/ca2260.md | 4 +- .../code-analysis/quality-rules/ca2261.md | 4 +- .../code-analysis/quality-rules/ca2262.md | 4 +- .../code-analysis/quality-rules/ca2263.md | 4 +- .../code-analysis/quality-rules/ca2264.md | 4 +- .../code-analysis/quality-rules/ca2265.md | 4 +- .../code-analysis/quality-rules/ca2266.md | 4 +- .../code-analysis/quality-rules/ca2300.md | 4 +- .../code-analysis/quality-rules/ca2301.md | 4 +- .../code-analysis/quality-rules/ca2302.md | 4 +- .../code-analysis/quality-rules/ca2305.md | 4 +- .../code-analysis/quality-rules/ca2310.md | 4 +- .../code-analysis/quality-rules/ca2311.md | 4 +- .../code-analysis/quality-rules/ca2312.md | 4 +- .../code-analysis/quality-rules/ca2315.md | 4 +- .../code-analysis/quality-rules/ca2321.md | 4 +- .../code-analysis/quality-rules/ca2322.md | 4 +- .../code-analysis/quality-rules/ca2326.md | 4 +- .../code-analysis/quality-rules/ca2327.md | 4 +- .../code-analysis/quality-rules/ca2328.md | 4 +- .../code-analysis/quality-rules/ca2329.md | 4 +- .../code-analysis/quality-rules/ca2330.md | 4 +- .../code-analysis/quality-rules/ca2350.md | 4 +- .../code-analysis/quality-rules/ca2351.md | 4 +- .../code-analysis/quality-rules/ca2352.md | 4 +- .../code-analysis/quality-rules/ca2353.md | 4 +- .../code-analysis/quality-rules/ca2354.md | 4 +- .../code-analysis/quality-rules/ca2355.md | 4 +- .../code-analysis/quality-rules/ca2356.md | 4 +- .../code-analysis/quality-rules/ca2361.md | 4 +- .../code-analysis/quality-rules/ca2362.md | 4 +- .../code-analysis/quality-rules/ca3001.md | 4 +- .../code-analysis/quality-rules/ca3002.md | 4 +- .../code-analysis/quality-rules/ca3003.md | 4 +- .../code-analysis/quality-rules/ca3004.md | 4 +- .../code-analysis/quality-rules/ca3005.md | 4 +- .../code-analysis/quality-rules/ca3006.md | 4 +- .../code-analysis/quality-rules/ca3007.md | 4 +- .../code-analysis/quality-rules/ca3008.md | 4 +- .../code-analysis/quality-rules/ca3009.md | 4 +- .../code-analysis/quality-rules/ca3010.md | 4 +- .../code-analysis/quality-rules/ca3011.md | 4 +- .../code-analysis/quality-rules/ca3012.md | 4 +- .../code-analysis/quality-rules/ca3061.md | 4 +- .../code-analysis/quality-rules/ca3075.md | 4 +- .../code-analysis/quality-rules/ca3076.md | 4 +- .../code-analysis/quality-rules/ca3077.md | 4 +- .../code-analysis/quality-rules/ca3147.md | 4 +- .../code-analysis/quality-rules/ca5350.md | 4 +- .../code-analysis/quality-rules/ca5351.md | 4 +- .../code-analysis/quality-rules/ca5358.md | 4 +- .../code-analysis/quality-rules/ca5359.md | 4 +- .../code-analysis/quality-rules/ca5360.md | 4 +- .../code-analysis/quality-rules/ca5361.md | 4 +- .../code-analysis/quality-rules/ca5362.md | 4 +- .../code-analysis/quality-rules/ca5363.md | 4 +- .../code-analysis/quality-rules/ca5364.md | 4 +- .../code-analysis/quality-rules/ca5365.md | 4 +- .../code-analysis/quality-rules/ca5366.md | 4 +- .../code-analysis/quality-rules/ca5367.md | 4 +- .../code-analysis/quality-rules/ca5368.md | 4 +- .../code-analysis/quality-rules/ca5369.md | 4 +- .../code-analysis/quality-rules/ca5370.md | 4 +- .../code-analysis/quality-rules/ca5371.md | 4 +- .../code-analysis/quality-rules/ca5372.md | 4 +- .../code-analysis/quality-rules/ca5373.md | 4 +- .../code-analysis/quality-rules/ca5374.md | 4 +- .../code-analysis/quality-rules/ca5375.md | 4 +- .../code-analysis/quality-rules/ca5376.md | 4 +- .../code-analysis/quality-rules/ca5377.md | 4 +- .../code-analysis/quality-rules/ca5378.md | 4 +- .../code-analysis/quality-rules/ca5379.md | 4 +- .../code-analysis/quality-rules/ca5380.md | 4 +- .../code-analysis/quality-rules/ca5381.md | 4 +- .../code-analysis/quality-rules/ca5382.md | 4 +- .../code-analysis/quality-rules/ca5383.md | 4 +- .../code-analysis/quality-rules/ca5384.md | 4 +- .../code-analysis/quality-rules/ca5385.md | 4 +- .../code-analysis/quality-rules/ca5386.md | 4 +- .../code-analysis/quality-rules/ca5387.md | 4 +- .../code-analysis/quality-rules/ca5388.md | 4 +- .../code-analysis/quality-rules/ca5389.md | 4 +- .../code-analysis/quality-rules/ca5390.md | 4 +- .../code-analysis/quality-rules/ca5391.md | 4 +- .../code-analysis/quality-rules/ca5392.md | 4 +- .../code-analysis/quality-rules/ca5393.md | 4 +- .../code-analysis/quality-rules/ca5394.md | 4 +- .../code-analysis/quality-rules/ca5395.md | 4 +- .../code-analysis/quality-rules/ca5396.md | 4 +- .../code-analysis/quality-rules/ca5397.md | 4 +- .../code-analysis/quality-rules/ca5398.md | 4 +- .../code-analysis/quality-rules/ca5399.md | 4 +- .../code-analysis/quality-rules/ca5400.md | 4 +- .../code-analysis/quality-rules/ca5401.md | 4 +- .../code-analysis/quality-rules/ca5402.md | 4 +- .../code-analysis/quality-rules/ca5403.md | 4 +- .../code-analysis/quality-rules/ca5404.md | 4 +- .../code-analysis/quality-rules/ca5405.md | 4 +- .../code-analysis/quality-rules/index.md | 6 +- .../quality-rules/maintainability-warnings.md | 3 +- .../quality-rules/performance-warnings.md | 3 +- .../quality-rules/reliability-warnings.md | 4 +- docs/navigate/tools-diagnostics/toc.yml | 8 ++ 339 files changed, 1107 insertions(+), 671 deletions(-) create mode 100644 docs/fundamentals/code-analysis/quality-rules/ca1517.md create mode 100644 docs/fundamentals/code-analysis/quality-rules/ca1876.md create mode 100644 docs/fundamentals/code-analysis/quality-rules/ca2027.md create mode 100644 docs/fundamentals/code-analysis/quality-rules/ca2028.md diff --git a/docs/core/compatibility/core-libraries/11/obsolete-apis.md b/docs/core/compatibility/core-libraries/11/obsolete-apis.md index 15216904d9212..332131e2377f5 100644 --- a/docs/core/compatibility/core-libraries/11/obsolete-apis.md +++ b/docs/core/compatibility/core-libraries/11/obsolete-apis.md @@ -2,7 +2,7 @@ title: "Breaking change: .NET 11 obsoletions with custom IDs" titleSuffix: "" description: Learn about the APIs that have been marked as obsolete in .NET 11 with a custom diagnostic ID. -ms.date: 10/14/2026 +ms.date: 11/12/2026 ai-usage: ai-assisted --- # API obsoletions with non-default diagnostic IDs (.NET 11) @@ -19,6 +19,7 @@ The following table lists the custom diagnostic IDs and their corresponding warn | Diagnostic ID | Description | Severity | |-------------------------------------------------------------------------|-------------|----------| +| [SYSLIB0063](../../../../fundamentals/syslib-diagnostics/syslib0063.md) | is obsolete. Use the constructor that omits the `isConnected` argument instead. | Warning | | [SYSLIB0064](../../../../fundamentals/syslib-diagnostics/syslib0064.md) | and are obsolete. Use the overloads that accept an instead. | Warning | | [SYSLIB0066](../../../../fundamentals/syslib-diagnostics/syslib0066.md) | is obsolete. Implement and register a custom instead; don't register the same implementation under both startup-validator interfaces. | Warning | @@ -38,6 +39,10 @@ These obsoletions can affect [source compatibility](../../categories.md#source-c ## Affected APIs +### SYSLIB0063 + +- + ### SYSLIB0064 - diff --git a/docs/core/project-sdk/msbuild-props.md b/docs/core/project-sdk/msbuild-props.md index 2d99d3f7a7453..6527762840c6f 100644 --- a/docs/core/project-sdk/msbuild-props.md +++ b/docs/core/project-sdk/msbuild-props.md @@ -1,7 +1,7 @@ --- title: MSBuild properties for Microsoft.NET.Sdk description: Reference for the MSBuild properties and items that are understood by the .NET SDK. -ms.date: 11/11/2026 +ms.date: 11/12/2026 ms.topic: reference ms.custom: updateeachrelease ai-usage: ai-assisted @@ -1010,11 +1010,11 @@ The following MSBuild properties are documented in this section: ### AnalysisLevel -The `AnalysisLevel` property lets you specify a set of code analyzers to run according to a .NET release. Each .NET release has a set of code analysis rules. Of that set, the rules that are enabled by default for that release analyze your code. For example, if you upgrade from .NET 8 to .NET 9 but don't want the default set of code analysis rules to change, set `AnalysisLevel` to `8`. +The `AnalysisLevel` property lets you specify a set of code analyzers to run according to a .NET release. Each .NET release has a set of code analysis rules. Of that set, the rules that are enabled by default for that release analyze your code. For example, if you upgrade from .NET 10 to .NET 11 but don't want the default set of code analysis rules to change, set `AnalysisLevel` to `10`. ```xml - 8 + 10 ``` @@ -1028,7 +1028,7 @@ Optionally, you can specify a compound value for this property that also specifi Default value: -- If your project targets .NET 5 or later, or if you've added the [AnalysisMode](#analysismode) property, the default value is `latest`. +- If your project targets .NET 5 or later, the default value matches the target framework version, except when the target framework is the latest released .NET version supported by the SDK. In that case, the default value is `latest`. - Otherwise, this property is omitted unless you explicitly add it to the project file. The following table shows the values you can specify. @@ -1112,7 +1112,7 @@ The following table shows the available option values. They're listed in increas > [!NOTE] > > - If you set [EnforceCodeStyleInBuild](#enforcecodestyleinbuild) to `true`, this property affects [code-style (IDEXXXX) rules](../../fundamentals/code-analysis/style-rules/index.md) (in addition to code-quality rules). -> - If you use a compound value for [AnalysisLevel](#analysislevel), for example, `9-recommended`, you can omit this property entirely. However, if you specify both properties, `AnalysisLevel` takes precedence over `AnalysisMode`. +> - If you use a compound value for [AnalysisLevel](#analysislevel), for example, `11-recommended`, you can omit this property entirely. However, if you specify both properties, `AnalysisLevel` takes precedence over `AnalysisMode`. ### AnalysisMode\ diff --git a/docs/fundamentals/code-analysis/overview.md b/docs/fundamentals/code-analysis/overview.md index 406631417329e..a9d3ab9f0458e 100644 --- a/docs/fundamentals/code-analysis/overview.md +++ b/docs/fundamentals/code-analysis/overview.md @@ -2,9 +2,10 @@ title: Code analysis in .NET titleSuffix: "" description: Learn about source code analysis in the .NET SDK. -ms.date: 11/05/2025 +ms.date: 11/12/2026 ms.topic: overview ms.custom: updateeachrelease +ai-usage: ai-assisted helpviewer_keywords: - code analysis - code analyzers @@ -24,6 +25,43 @@ If rule violations are found by an analyzer, they're reported as a suggestion, w ### Enabled rules +# [.NET 11](#tab/net-11) + +The following rules are enabled, by default, as errors or warnings in .NET 11. Additional rules are enabled as suggestions. + +| Diagnostic ID | Category | Severity | Version added | Description | +|-----------------------------------|------------------|----------|---------------|---------------------------------| +| [CA1416](quality-rules/ca1416.md) | Interoperability | Warning | .NET 5 | Validate platform compatibility | +| [CA1417](quality-rules/ca1417.md) | Interoperability | Warning | .NET 5 | Do not use `OutAttribute` on string parameters for P/Invokes | +| [CA1418](quality-rules/ca1418.md) | Interoperability | Warning | .NET 6 | Use valid platform string | +| [CA1420](quality-rules/ca1420.md) | Interoperability | Warning | .NET 7 | Using features that require runtime marshalling when it's disabled will result in runtime exceptions | +| [CA1422](quality-rules/ca1422.md) | Interoperability | Warning | .NET 7 | Validate platform compatibility | +| [CA1831](quality-rules/ca1831.md) | Performance | Warning | .NET 5 | Use `AsSpan` instead of range-based indexers for string when appropriate | +| [CA1856](quality-rules/ca1856.md) | Performance | Error | .NET 8 | Incorrect usage of `ConstantExpected` attribute | +| [CA1857](quality-rules/ca1857.md) | Performance | Warning | .NET 8 | A constant is expected for the parameter | +| [CA2013](quality-rules/ca2013.md) | Reliability | Warning | .NET 5 | Do not use `ReferenceEquals` with value types | +| [CA2014](quality-rules/ca2014.md) | Reliability | Warning | .NET 5 | Do not use `stackalloc` in loops | +| [CA2015](quality-rules/ca2015.md) | Reliability | Warning | .NET 5 | Do not define finalizers for types derived from | +| [CA2017](quality-rules/ca2017.md) | Reliability | Warning | .NET 6 | Parameter count mismatch | +| [CA2018](quality-rules/ca2018.md) | Reliability | Warning | .NET 6 | The `count` argument to `Buffer.BlockCopy` should specify the number of bytes to copy | +| [CA2021](quality-rules/ca2021.md) | Reliability | Warning | .NET 8 | Do not call `Enumerable.Cast` or `Enumerable.OfType` with incompatible types | +| [CA2022](quality-rules/ca2022.md) | Reliability | Warning | .NET 9 | Avoid inexact read with `Stream.Read` | +| [CA2023](quality-rules/ca2023.md) | Reliability | Warning | .NET 10 | Invalid braces in message template | +| [CA2200](quality-rules/ca2200.md) | Usage | Warning | .NET 5 | Rethrow to preserve stack details | +| [CA2247](quality-rules/ca2247.md) | Usage | Warning | .NET 5 | Argument passed to `TaskCompletionSource` constructor should be enum instead of | +| [CA2252](quality-rules/ca2252.md) | Usage | Error | .NET 6 | Opt in to preview features | +| [CA2255](quality-rules/ca2255.md) | Usage | Warning | .NET 6 | The `ModuleInitializer` attribute should not be used in libraries | +| [CA2256](quality-rules/ca2256.md) | Usage | Warning | .NET 6 | All members declared in parent interfaces must have an implementation in a `DynamicInterfaceCastableImplementation`-attributed interface | +| [CA2257](quality-rules/ca2257.md) | Usage | Warning | .NET 6 | Members defined on an interface with the `DynamicInterfaceCastableImplementationAttribute` should be `static` | +| [CA2258](quality-rules/ca2258.md) | Usage | Warning | .NET 6 | Providing a `DynamicInterfaceCastableImplementation` interface in Visual Basic is unsupported | +| [CA2259](quality-rules/ca2259.md) | Usage | Warning | .NET 7 | `ThreadStatic` only affects static fields | +| [CA2260](quality-rules/ca2260.md) | Usage | Warning | .NET 7 | Use correct type parameter | +| [CA2261](quality-rules/ca2261.md) | Usage | Warning | .NET 8 | Do not use `ConfigureAwaitOptions.SuppressThrowing` with `Task` | +| [CA2264](quality-rules/ca2264.md) | Usage | Warning | .NET 9 | Do not pass a non-nullable value to `ArgumentNullException.ThrowIfNull` | +| [CA2265](quality-rules/ca2265.md) | Usage | Warning | .NET 9 | Do not compare `Span` to `null` or `default` | +| [CA2266](quality-rules/ca2266.md) | Usage | Warning | .NET 10 | File-based program entry point should start with `#!` | +| [CA2267](quality-rules/ca2267.md) | Usage | Warning | .NET 11 | Quote whitespace in file-based program directive values | + # [.NET 10](#tab/net-10) The following rules are enabled, by default, as errors or warnings in .NET 10. Additional rules are enabled as suggestions. @@ -140,7 +178,7 @@ You can change the severity of these rules to disable them or elevate them to er You can also omit [``](../../core/project-sdk/msbuild-props.md#analysismode) in favor of a compound value for the `` property. For example, the following value enables the recommended set of rules for the latest release: `latest-Recommended`. For more information, see [`AnalysisLevel`](../../core/project-sdk/msbuild-props.md#analysislevel). -To find the default severity for each available rule and whether or not the rule is enabled in `Default` analysis mode, see the [full list of rules](https://github.com/dotnet/roslyn-analyzers/blob/main/src/NetAnalyzers/Core/AnalyzerReleases.Shipped.md). +To find the default severity for each available rule and whether or not the rule is enabled in `Default` analysis mode, see the [full list of rules](https://github.com/dotnet/sdk/blob/main/src/Microsoft.CodeAnalysis.NetAnalyzers/src/Microsoft.CodeAnalysis.NetAnalyzers/AnalyzerReleases.Shipped.md). ### Treat warnings as errors @@ -156,19 +194,17 @@ You'll still see any code analysis warnings, but they won't break your build. ### Latest updates -By default, you'll get the latest code analysis rules and default rule severities as you upgrade to newer versions of the .NET SDK. If you don't want this behavior, for example, if you want to ensure that no new rules are enabled or disabled, you can override it in one of the following ways: +By default, the code analysis rules and default severities match your target framework version. The latest released .NET version supported by the SDK uses the latest rules. Older target frameworks keep their corresponding rules, even when you build with a newer SDK. To use the latest rules regardless of the target framework, set `AnalysisLevel` to `latest`. -- Set the `AnalysisLevel` MSBuild property to a specific value to lock the warnings to that set. When you upgrade to a newer SDK, you'll still get bug fixes for those warnings, but no new warnings will be enabled and no existing warnings will be disabled. For example, to lock the set of rules to those that ship with version 8.0 of the .NET SDK, add the following entry to your project file. +- Set the `AnalysisLevel` MSBuild property to a specific value to lock the warnings to that set. When you upgrade to a newer SDK, you'll still get bug fixes for those warnings, but no new warnings will be enabled and no existing warnings will be disabled. For example, if you upgrade from .NET 10 to .NET 11 but want to keep the .NET 10 rules, add the following entry to your project file. ```xml - 8.0 + 10.0 ``` > [!TIP] - > The default value for the `AnalysisLevel` property is `latest`, which means you always get the latest code analysis rules as you move to newer versions of the .NET SDK. - For more information, and to see a list of possible values, see [AnalysisLevel](../../core/project-sdk/msbuild-props.md#analysislevel). - Install the [Microsoft.CodeAnalysis.NetAnalyzers NuGet package](https://github.com/dotnet/roslyn-analyzers#microsoftcodeanalysisnetanalyzers) to decouple rule updates from .NET SDK updates. For projects that target .NET 5+, installing the package turns off the built-in SDK analyzers. You'll get a build warning if the SDK contains a newer analyzer assembly version than that of the NuGet package. To disable the warning, set the `_SkipUpgradeNetAnalyzersNuGetWarning` property to `true`. diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1000.md b/docs/fundamentals/code-analysis/quality-rules/ca1000.md index e0daac99d1e5c..d3064c765fd23 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1000.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1000.md @@ -1,7 +1,7 @@ --- title: "CA1000: Do not declare static members on generic types (code analysis)" description: "Learn about code analysis rule CA1000: Do not declare static members on generic types" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1000 - DoNotDeclareStaticMembersOnGenericTypes @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not declare static members on generic types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1001.md b/docs/fundamentals/code-analysis/quality-rules/ca1001.md index 318ccfd864510..13ef60db8315a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1001.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1001.md @@ -1,7 +1,7 @@ --- title: "CA1001: Types that own disposable fields should be disposable (code analysis)" description: "Learn about code analysis rule CA1001: Types that own disposable fields should be disposable" -ms.date: 12/18/2020 +ms.date: 11/12/2026 f1_keywords: - CA1001 - TypesThatOwnDisposableFieldsShouldBeDisposable @@ -22,7 +22,7 @@ dev_langs: | **Title** | Types that own disposable fields should be disposable | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking - If the type is not visible outside the assembly.

Breaking - If the type is visible outside the assembly. | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1002.md b/docs/fundamentals/code-analysis/quality-rules/ca1002.md index 99abd828e4191..2f78b5f18ab0d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1002.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1002.md @@ -1,7 +1,7 @@ --- title: "CA1002: Do not expose generic lists (code analysis)" description: "Learn about code analysis rule CA1002: Do not expose generic lists" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - DoNotExposeGenericLists - CA1002 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Do not expose generic lists | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1003.md b/docs/fundamentals/code-analysis/quality-rules/ca1003.md index c20edbe7c4e55..5059557b57cbe 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1003.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1003.md @@ -1,7 +1,7 @@ --- title: "CA1003: Use generic event handler instances (code analysis)" description: "Learn about code analysis rule CA1003: Use generic event handler instances" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - UseGenericEventHandlerInstances - CA1003 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Use generic event handler instances | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1005.md b/docs/fundamentals/code-analysis/quality-rules/ca1005.md index b32aaba15f99e..14038092b0ec5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1005.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1005.md @@ -1,7 +1,7 @@ --- title: "CA1005: Avoid excessive parameters on generic types (code analysis)" description: "Learn about code analysis rule CA1005: Avoid excessive parameters on generic types" -ms.date: 06/11/2020 +ms.date: 11/12/2026 f1_keywords: - AvoidExcessiveParametersOnGenericTypes - CA1005 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Avoid excessive parameters on generic types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1008.md b/docs/fundamentals/code-analysis/quality-rules/ca1008.md index c289c43d37d0e..5d8933bd3ff6b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1008.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1008.md @@ -1,7 +1,7 @@ --- title: "CA1008: Enums should have zero value (code analysis)" description: "Learn about code analysis rule CA1008: Enums should have zero value" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1008 - EnumsShouldHaveZeroValue @@ -22,7 +22,7 @@ dev_langs: | **Title** | Enums should have zero value | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking - When you're prompted to add a `None` value to a non-flag enumeration. Breaking - When you're prompted to rename or remove any enumeration values. | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1010.md b/docs/fundamentals/code-analysis/quality-rules/ca1010.md index 2641842af7037..b7e8437956d01 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1010.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1010.md @@ -1,7 +1,7 @@ --- title: "CA1010: Collections should implement generic interface (code analysis)" description: "Learn about code analysis rule CA1010: Collections should implement generic interface" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1010 - CollectionsShouldImplementGenericInterface @@ -21,7 +21,7 @@ ms.author: gewarren | **Title** | Collections should implement generic interface | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1012.md b/docs/fundamentals/code-analysis/quality-rules/ca1012.md index e33699b7f8092..a9664d3e13252 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1012.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1012.md @@ -1,7 +1,7 @@ --- title: "CA1012: Abstract types should not have public constructors (code analysis)" description: "Learn about code analysis rule CA1012: Abstract types should not have public constructors" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - AbstractTypesShouldNotHaveConstructors - CA1012 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Abstract types should not have public constructors | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1014.md b/docs/fundamentals/code-analysis/quality-rules/ca1014.md index 12e51121302bb..db665d825aa6d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1014.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1014.md @@ -1,7 +1,7 @@ --- title: "CA1014: Mark assemblies with CLSCompliantAttribute (code analysis)" description: "Learn about code analysis rule CA1014: Mark assemblies with CLSCompliantAttribute" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1014 - MarkAssembliesWithClsCompliant @@ -22,7 +22,7 @@ dev_langs: | **Title** | Mark assemblies with CLSCompliantAttribute | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1016.md b/docs/fundamentals/code-analysis/quality-rules/ca1016.md index 18b544521617f..a021d9f18de7b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1016.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1016.md @@ -1,7 +1,7 @@ --- title: "CA1016: Mark assemblies with AssemblyVersionAttribute (code analysis)" description: "Learn about code analysis rule CA1016: Mark assemblies with AssemblyVersionAttribute" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - MarkAssembliesWithAssemblyVersion - CA1016 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Mark assemblies with AssemblyVersionAttribute | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1017.md b/docs/fundamentals/code-analysis/quality-rules/ca1017.md index 7b9f445f63d3c..bba930bb87003 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1017.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1017.md @@ -1,7 +1,7 @@ --- title: "CA1017: Mark assemblies with ComVisibleAttribute (code analysis)" description: "Learn about code analysis rule CA1017: Mark assemblies with ComVisibleAttribute" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1017 - MarkAssembliesWithComVisible @@ -22,7 +22,7 @@ dev_langs: | **Title** | Mark assemblies with ComVisibleAttribute | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1018.md b/docs/fundamentals/code-analysis/quality-rules/ca1018.md index a32ba89faab83..6f8b4ce1159a8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1018.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1018.md @@ -1,7 +1,7 @@ --- title: "CA1018: Mark attributes with AttributeUsageAttribute (code analysis)" description: "Learn about code analysis rule CA1018: Mark attributes with AttributeUsageAttribute" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1018 - MarkAttributesWithAttributeUsage @@ -22,7 +22,7 @@ dev_langs: | **Title** | Mark attributes with AttributeUsageAttribute | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1019.md b/docs/fundamentals/code-analysis/quality-rules/ca1019.md index 2aa6aea2f3028..dbaeea0ccc7ed 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1019.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1019.md @@ -1,7 +1,7 @@ --- title: "CA1019: Define accessors for attribute arguments (code analysis)" description: "Learn about code analysis rule CA1019: Define accessors for attribute arguments" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1019 - DefineAccessorsForAttributeArguments @@ -22,7 +22,7 @@ dev_langs: | **Title** | Define accessors for attribute arguments | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1021.md b/docs/fundamentals/code-analysis/quality-rules/ca1021.md index a59b9d99c14b7..47bcfe119718a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1021.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1021.md @@ -1,7 +1,7 @@ --- title: "CA1021: Avoid out parameters (code analysis)" description: "Learn about code analysis rule CA1021: Avoid out parameters" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1021 - AvoidOutParameters @@ -21,7 +21,7 @@ ms.author: gewarren | **Title** | Avoid out parameters | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1024.md b/docs/fundamentals/code-analysis/quality-rules/ca1024.md index e6348a54261ba..1f11c7be27739 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1024.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1024.md @@ -1,7 +1,7 @@ --- title: "CA1024: Use properties where appropriate (code analysis)" description: "Learn about code analysis rule CA1024: Use properties where appropriate" -ms.date: 12/21/2020 +ms.date: 11/12/2026 f1_keywords: - UsePropertiesWhereAppropriate - CA1024 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Use properties where appropriate | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1027.md b/docs/fundamentals/code-analysis/quality-rules/ca1027.md index 5a0cf1e2d13bd..e33879558f563 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1027.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1027.md @@ -1,7 +1,7 @@ --- title: "CA1027: Mark enums with FlagsAttribute (code analysis)" description: "Learn about code analysis rule CA1027: Mark enums with FlagsAttribute" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - MarkEnumsWithFlags - CA1027 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Mark enums with FlagsAttribute | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1028.md b/docs/fundamentals/code-analysis/quality-rules/ca1028.md index faef3b2728ea9..a13940ab49b6f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1028.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1028.md @@ -1,7 +1,7 @@ --- title: "CA1028: Enum storage should be Int32 (code analysis)" description: "Learn about code analysis rule CA1028: Enum storage should be Int32" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1028 - EnumStorageShouldBeInt32 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Enum storage should be Int32 | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1030.md b/docs/fundamentals/code-analysis/quality-rules/ca1030.md index b9e9b8729a9f4..794881e841e4a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1030.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1030.md @@ -1,7 +1,7 @@ --- title: "CA1030: Use events where appropriate (code analysis)" description: "Learn about code analysis rule CA1030: Use events where appropriate" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - UseEventsWhereAppropriate - CA1030 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Use events where appropriate | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1031.md b/docs/fundamentals/code-analysis/quality-rules/ca1031.md index fa7c18c3f1424..1e985142cf3cb 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1031.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1031.md @@ -1,7 +1,7 @@ --- title: "CA1031: Do not catch general exception types (code analysis)" description: "Learn about code analysis rule CA1031: Do not catch general exception types" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1031 - DoNotCatchGeneralExceptionTypes @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not catch general exception types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1032.md b/docs/fundamentals/code-analysis/quality-rules/ca1032.md index 3de61c1dd5e7e..537ed9fdcfe10 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1032.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1032.md @@ -1,7 +1,7 @@ --- title: "CA1032: Implement standard exception constructors (code analysis)" description: "Learn about code analysis rule CA1032: Implement standard exception constructors" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1032 - ImplementStandardExceptionConstructors @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Implement standard exception constructors | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1033.md b/docs/fundamentals/code-analysis/quality-rules/ca1033.md index 019d06bd8787d..c2f31942c5416 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1033.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1033.md @@ -1,7 +1,7 @@ --- title: "CA1033: Interface methods should be callable by child types (code analysis)" description: "Learn about code analysis rule CA1033: Interface methods should be callable by child types" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - InterfaceMethodsShouldBeCallableByChildTypes - CA1033 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Interface methods should be callable by child types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1034.md b/docs/fundamentals/code-analysis/quality-rules/ca1034.md index fb90e5ffa691a..0c4a799e1322f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1034.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1034.md @@ -1,7 +1,7 @@ --- title: "CA1034: Nested types should not be visible (code analysis)" description: "Learn about code analysis rule CA1034: Nested types should not be visible" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - NestedTypesShouldNotBeVisible - CA1034 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Nested types should not be visible | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1036.md b/docs/fundamentals/code-analysis/quality-rules/ca1036.md index 910f50f3f1cb3..a78797fb0600e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1036.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1036.md @@ -1,7 +1,7 @@ --- title: "CA1036: Override methods on comparable types (code analysis)" description: "Learn about code analysis rule CA1036: Override methods on comparable types" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1036 - OverrideMethodsOnComparableTypes @@ -22,7 +22,7 @@ dev_langs: | **Title** | Override methods on comparable types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1040.md b/docs/fundamentals/code-analysis/quality-rules/ca1040.md index dc4a08b866119..24b828823cd00 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1040.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1040.md @@ -1,7 +1,7 @@ --- title: "CA1040: Avoid empty interfaces (code analysis)" description: "Learn about code analysis rule CA1040: Avoid empty interfaces" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1040 - AvoidEmptyInterfaces @@ -22,7 +22,7 @@ dev_langs: | **Title** | Avoid empty interfaces | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1041.md b/docs/fundamentals/code-analysis/quality-rules/ca1041.md index a206a3cc01210..e71c8354333da 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1041.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1041.md @@ -1,7 +1,7 @@ --- title: "CA1041: Provide ObsoleteAttribute message (code analysis)" description: "Learn about code analysis rule CA1041: Provide ObsoleteAttribute message" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1041 - ProvideObsoleteAttributeMessage @@ -22,7 +22,7 @@ dev_langs: | **Title** | Provide ObsoleteAttribute message | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1043.md b/docs/fundamentals/code-analysis/quality-rules/ca1043.md index c9d9b0cfc2c5a..e3738ac1f1304 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1043.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1043.md @@ -1,7 +1,7 @@ --- title: "CA1043: Use integral or string argument for indexers (code analysis)" description: "Learn about code analysis rule CA1043: Use integral or string argument for indexers" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1043 - UseIntegralOrStringArgumentForIndexers @@ -22,7 +22,7 @@ dev_langs: | **Title** | Use integral or string argument for indexers | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1044.md b/docs/fundamentals/code-analysis/quality-rules/ca1044.md index 2601d41f7abc5..97839bb275bbf 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1044.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1044.md @@ -1,7 +1,7 @@ --- title: "CA1044: Properties should not be write only (code analysis)" description: "Learn about code analysis rule CA1044: Properties should not be write only" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - PropertiesShouldNotBeWriteOnly - CA1044 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Properties should not be write only | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1045.md b/docs/fundamentals/code-analysis/quality-rules/ca1045.md index 73dd03adafeb3..5f321d46ec1e6 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1045.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1045.md @@ -1,7 +1,7 @@ --- title: "CA1045: Do not pass types by reference (code analysis)" description: "Learn about code analysis rule CA1045: Do not pass types by reference" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1045 - DoNotPassTypesByReference @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Do not pass types by reference | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1046.md b/docs/fundamentals/code-analysis/quality-rules/ca1046.md index e67511a006762..b3f53b58368b8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1046.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1046.md @@ -1,7 +1,7 @@ --- title: "CA1046: Do not overload operator equals on reference types (code analysis)" description: "Learn about code analysis rule CA1046: Do not overload operator equals on reference types" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - "DoNotOverloadOperatorEqualsOnReferenceTypes" - "CA1046" @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Do not overload operator equals on reference types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1047.md b/docs/fundamentals/code-analysis/quality-rules/ca1047.md index ae07b2d6bf28d..8b12839ec458a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1047.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1047.md @@ -1,7 +1,7 @@ --- title: "CA1047: Do not declare protected members in sealed types (code analysis)" description: "Learn about code analysis rule CA1047: Do not declare protected members in sealed types" -ms.date: 06/11/2020 +ms.date: 11/12/2026 f1_keywords: - DoNotDeclareProtectedMembersInSealedTypes - CA1047 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not declare protected members in sealed types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1050.md b/docs/fundamentals/code-analysis/quality-rules/ca1050.md index c08e4bf8b74b4..f277f615926ea 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1050.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1050.md @@ -1,7 +1,7 @@ --- title: "CA1050: Declare types in namespaces (code analysis)" description: "Learn about code analysis rule CA1050: Declare types in namespaces" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1050 - DeclareTypesInNamespaces @@ -22,7 +22,7 @@ dev_langs: | **Title** | Declare types in namespaces | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1051.md b/docs/fundamentals/code-analysis/quality-rules/ca1051.md index 27b11a82ff392..f766847f51fa2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1051.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1051.md @@ -1,7 +1,7 @@ --- title: "CA1051: Do not declare visible instance fields (code analysis)" description: "Learn about code analysis rule CA1051: Do not declare visible instance fields" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1051 - DoNotDeclareVisibleInstanceFields @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Do not declare visible instance fields | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1052.md b/docs/fundamentals/code-analysis/quality-rules/ca1052.md index db43020dfb935..92edb62cd9530 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1052.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1052.md @@ -1,7 +1,7 @@ --- title: "CA1052: Static holder types should be Static or NotInheritable (code analysis)" description: "Learn about code analysis rule CA1052: Static holder types should be Static or NotInheritable" -ms.date: 07/25/2019 +ms.date: 11/12/2026 f1_keywords: - StaticHolderTypesShouldBeSealed - CA1052 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Static holder types should be Static or NotInheritable | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1053.md b/docs/fundamentals/code-analysis/quality-rules/ca1053.md index 13dba487410ad..2d6e32724248f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1053.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1053.md @@ -1,7 +1,7 @@ --- title: "CA1053: Static holder types should not have constructors (code analysis)" description: "Learn about code analysis rule CA1053: Static holder types should not have constructors" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - StaticHolderTypesShouldNotHaveConstructors - CA1053 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Static holder types should not have default constructors | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | > [!NOTE] diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1054.md b/docs/fundamentals/code-analysis/quality-rules/ca1054.md index 3b9e782a50da0..ea948fbc4af71 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1054.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1054.md @@ -1,7 +1,7 @@ --- title: "CA1054: URI parameters should not be strings (code analysis)" description: "Learn about code analysis rule CA1054: URI parameters should not be strings" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1054 - UriParametersShouldNotBeStrings @@ -22,7 +22,7 @@ dev_langs: | **Title** | URI parameters should not be strings | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1055.md b/docs/fundamentals/code-analysis/quality-rules/ca1055.md index 53f7961ffd617..512ca9d12b5e5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1055.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1055.md @@ -1,7 +1,7 @@ --- title: "CA1055: URI return values should not be strings (code analysis)" description: "Learn about code analysis rule CA1055: URI return values should not be strings" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1055 - UriReturnValuesShouldNotBeStrings @@ -22,7 +22,7 @@ dev_langs: | **Title** | URI return values should not be strings | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1056.md b/docs/fundamentals/code-analysis/quality-rules/ca1056.md index 0b4edb39296db..d8d776dba1107 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1056.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1056.md @@ -1,7 +1,7 @@ --- title: "CA1056: URI properties should not be strings (code analysis)" description: "Learn about code analysis rule CA1056: URI properties should not be strings" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - UriPropertiesShouldNotBeStrings - CA1056 @@ -22,7 +22,7 @@ dev_langs: | **Title** | URI properties should not be strings | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1058.md b/docs/fundamentals/code-analysis/quality-rules/ca1058.md index 6ee0d753da465..4e86db0568060 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1058.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1058.md @@ -1,7 +1,7 @@ --- title: "CA1058: Types should not extend certain base types (code analysis)" description: "Learn about code analysis rule CA1058: Types should not extend certain base types" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - TypesShouldNotExtendCertainBaseTypes - CA1058 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Types should not extend certain base types | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1060.md b/docs/fundamentals/code-analysis/quality-rules/ca1060.md index 038100d0c69b4..dcb98005e4bf2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1060.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1060.md @@ -1,7 +1,7 @@ --- title: "CA1060: Move P-Invokes to NativeMethods class (code analysis)" description: "Learn about code analysis rule CA1060: Move P-Invokes to NativeMethods class" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - MovePInvokesToNativeMethodsClass - CA1060 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Move P/Invokes to NativeMethods class | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1061.md b/docs/fundamentals/code-analysis/quality-rules/ca1061.md index 9daadbe82a7d7..7b3c80b846eca 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1061.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1061.md @@ -1,7 +1,7 @@ --- title: "CA1061: Do not hide base class methods (code analysis)" description: "Learn about code analysis rule CA1061: Do not hide base class methods" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1061 - DoNotHideBaseClassMethods @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Do not hide base class methods | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1062.md b/docs/fundamentals/code-analysis/quality-rules/ca1062.md index 86b9c059ab50d..cf23f075ab8a4 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1062.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1062.md @@ -1,7 +1,7 @@ --- title: "CA1062: Validate arguments of public methods (code analysis)" description: "Learn about code analysis rule CA1062: Validate arguments of public methods" -ms.date: 12/18/2020 +ms.date: 11/12/2026 f1_keywords: - CA1062 - ValidateArgumentsOfPublicMethods @@ -23,7 +23,7 @@ dev_langs: | **Title** | Validate arguments of public methods | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1063.md b/docs/fundamentals/code-analysis/quality-rules/ca1063.md index bbb110f7eff6a..0d74652071c69 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1063.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1063.md @@ -1,7 +1,7 @@ --- title: "CA1063: Implement IDisposable correctly (code analysis)" description: "Learn about code analysis rule CA1063: Implement IDisposable correctly" -ms.date: 11/09/2022 +ms.date: 11/12/2026 f1_keywords: - ImplementIDisposableCorrectly - CA1063 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Implement IDisposable correctly | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1064.md b/docs/fundamentals/code-analysis/quality-rules/ca1064.md index 7e631505a641e..ee9d7e34c0e90 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1064.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1064.md @@ -1,7 +1,7 @@ --- title: "CA1064: Exceptions should be public (code analysis)" description: "Learn about code analysis rule CA1064: Exceptions should be public" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1064 - ExceptionsShouldBePublic @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Exceptions should be public | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1065.md b/docs/fundamentals/code-analysis/quality-rules/ca1065.md index 3fd420571a250..a2ec16bcaeb86 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1065.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1065.md @@ -1,7 +1,7 @@ --- title: "CA1065: Do not raise exceptions in unexpected locations (code analysis)" description: "Learn about code analysis rule CA1065: Do not raise exceptions in unexpected locations" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1065 - DoNotRaiseExceptionsInUnexpectedLocations @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Do not raise exceptions in unexpected locations | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1066.md b/docs/fundamentals/code-analysis/quality-rules/ca1066.md index 15b474d4dc58b..8a295644f21cb 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1066.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1066.md @@ -1,7 +1,7 @@ --- title: "CA1066: Implement IEquatable when overriding Equals (code analysis)" description: "Learn about code analysis rule CA1066: Implement IEquatable when overriding Equals" -ms.date: 04/23/2020 +ms.date: 11/12/2026 f1_keywords: - CA1066 helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Implement IEquatable when overriding Equals | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1067.md b/docs/fundamentals/code-analysis/quality-rules/ca1067.md index 0bf49585c39ad..dcabedf9f2cd2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1067.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1067.md @@ -1,7 +1,7 @@ --- title: "CA1067: Override Equals when implementing IEquatable (code analysis)" description: "Learn about code analysis rule CA1067: Override Equals when implementing IEquatable" -ms.date: 04/23/2020 +ms.date: 11/12/2026 f1_keywords: - CA1067 helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Override Equals when implementing IEquatable | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1068.md b/docs/fundamentals/code-analysis/quality-rules/ca1068.md index bcc2cddb63994..94abfdb9985fd 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1068.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1068.md @@ -1,7 +1,7 @@ --- title: "CA1068: CancellationToken parameters must come last (code analysis)" description: "Learn about code analysis rule CA1068: CancellationToken parameters must come last" -ms.date: 09/16/2019 +ms.date: 11/12/2026 f1_keywords: - "CA1068" - "CancellationTokenParametersMustComeLast" @@ -18,7 +18,7 @@ author: mavasani | **Title** | CancellationToken parameters must come last | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1069.md b/docs/fundamentals/code-analysis/quality-rules/ca1069.md index 9a33d027e75fd..b125f46f32384 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1069.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1069.md @@ -1,7 +1,7 @@ --- title: "CA1069: Enums should not have duplicate values (code analysis)" description: "Learn about code analysis rule CA1069: Enums should not have duplicate values" -ms.date: 09/16/2019 +ms.date: 11/12/2026 f1_keywords: - "CA1069" helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Enums should not have duplicate values | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1070.md b/docs/fundamentals/code-analysis/quality-rules/ca1070.md index 074f0928dff36..13516adf2a041 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1070.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1070.md @@ -1,7 +1,7 @@ --- title: "CA1070: Do not declare event fields as virtual (code analysis)" description: "Learn about code analysis rule CA1070: Do not declare event fields as virtual" -ms.date: 04/30/2020 +ms.date: 11/12/2026 f1_keywords: - "CA1070" helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Do not declare event fields as virtual | | **Category** | [Design](design-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1200.md b/docs/fundamentals/code-analysis/quality-rules/ca1200.md index 0aacb6a36d857..dfb001b61a5dc 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1200.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1200.md @@ -1,7 +1,7 @@ --- title: "CA1200: Avoid using cref tags with a prefix (code analysis)" description: "Learn about code analysis rule CA1200: Avoid using cref tags with a prefix" -ms.date: 09/16/2019 +ms.date: 11/12/2026 f1_keywords: - "AvoidUsingCrefTagsWithAPrefix" - "CA1200" @@ -20,7 +20,7 @@ dev_langs: | **Title** | Avoid using cref tags with a prefix | | **Category** | [Documentation](documentation-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1303.md b/docs/fundamentals/code-analysis/quality-rules/ca1303.md index 2e40eeac9f1f0..e4fe89c866567 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1303.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1303.md @@ -1,7 +1,7 @@ --- title: "CA1303: Do not pass literals as localized parameters (code analysis)" description: "Learn about code analysis rule CA1303: Do not pass literals as localized parameters" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - Do not pass literals as localized parameters - DoNotPassLiteralsAsLocalizedParameters @@ -23,7 +23,7 @@ dev_langs: | **Title** | Do not pass literals as localized parameters | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1304.md b/docs/fundamentals/code-analysis/quality-rules/ca1304.md index b0c19b7b2689a..ce960b51f23d0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1304.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1304.md @@ -1,7 +1,7 @@ --- title: "CA1304: Specify CultureInfo (code analysis)" description: "Learn about code analysis rule CA1304: Specify CultureInfo" -ms.date: 06/30/2018 +ms.date: 11/12/2026 f1_keywords: - SpecifyCultureInfo - CA1304 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Specify CultureInfo | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1305.md b/docs/fundamentals/code-analysis/quality-rules/ca1305.md index 1ecdd5a2c69b6..2645c662aed58 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1305.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1305.md @@ -1,7 +1,7 @@ --- title: "CA1305: Specify IFormatProvider (code analysis)" description: "Learn about code analysis rule CA1305: Specify IFormatProvider" -ms.date: 07/17/2023 +ms.date: 11/12/2026 f1_keywords: - SpecifyIFormatProvider - CA1305 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Specify IFormatProvider | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1307.md b/docs/fundamentals/code-analysis/quality-rules/ca1307.md index 790a0b18102d1..51677e792949b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1307.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1307.md @@ -1,7 +1,7 @@ --- title: "CA1307: Specify StringComparison for clarity (code analysis)" description: "Learn about code analysis rule CA1307: Specify StringComparison for clarity" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1307 - SpecifyStringComparison @@ -21,7 +21,7 @@ ms.author: gewarren | **Title** | Specify StringComparison for clarity | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1308.md b/docs/fundamentals/code-analysis/quality-rules/ca1308.md index 3ac7f560c6969..b0a5265302d60 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1308.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1308.md @@ -1,7 +1,7 @@ --- title: "CA1308: Normalize strings to uppercase (code analysis)" description: "Learn about code analysis rule CA1308: Normalize strings to uppercase" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1308 - NormalizeStringsToUppercase @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Normalize strings to uppercase | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1309.md b/docs/fundamentals/code-analysis/quality-rules/ca1309.md index 42887ac236fa2..3a1a3248aed4f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1309.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1309.md @@ -1,7 +1,7 @@ --- title: "CA1309: Use ordinal StringComparison (code analysis)" description: "Learn about code analysis rule CA1309: Use ordinal StringComparison" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - UseOrdinalStringComparison - CA1309 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Use ordinal StringComparison | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1310.md b/docs/fundamentals/code-analysis/quality-rules/ca1310.md index 3ce9787533272..6ab8fe5e53839 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1310.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1310.md @@ -1,7 +1,7 @@ --- title: "CA1310: Specify StringComparison for correctness (code analysis)" description: "Learn about code analysis rule CA1310: Specify StringComparison for correctness" -ms.date: 08/26/2020 +ms.date: 11/12/2026 f1_keywords: - CA1310 - SpecifyStringComparison @@ -21,7 +21,7 @@ ms.author: gewarren | **Title** | Specify StringComparison for correctness | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1311.md b/docs/fundamentals/code-analysis/quality-rules/ca1311.md index 4c924f5124172..c7521e98cf38e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1311.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1311.md @@ -1,7 +1,7 @@ --- title: "CA1311: Specify a culture or use an invariant version (code analysis)" description: "Learn about code analysis rule CA1311: Specify a culture or use an invariant version" -ms.date: 11/16/2022 +ms.date: 11/12/2026 f1_keywords: - CA1311 - SpecifyCultureForToLowerAndToUpper @@ -19,7 +19,7 @@ dev_langs: | **Title** | Specify a culture or use an invariant version | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1401.md b/docs/fundamentals/code-analysis/quality-rules/ca1401.md index 7ce74aa1fc1cb..6b73513e1628e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1401.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1401.md @@ -1,7 +1,7 @@ --- title: "CA1401: P-Invokes should not be visible (code analysis)" description: "Learn about code analysis rule CA1401: P-Invokes should not be visible" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - PInvokesShouldNotBeVisible - CA1401 @@ -22,7 +22,7 @@ dev_langs: | **Title** | P/Invokes should not be visible | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1416.md b/docs/fundamentals/code-analysis/quality-rules/ca1416.md index efa97ad713cd1..4833a8ec2bde1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1416.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1416.md @@ -1,7 +1,7 @@ --- title: "CA1416: Validate platform compatibility (code analysis)" description: "Learn about code analysis rule ca1416: Validate platform compatibility" -ms.date: 09/20/2021 +ms.date: 11/12/2026 f1_keywords: - "PlatformCompatibilityAnalyzer" - "CA1416" @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Validate platform compatibility | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1417.md b/docs/fundamentals/code-analysis/quality-rules/ca1417.md index c06cce7b7abb4..fd52b71941983 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1417.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1417.md @@ -1,7 +1,7 @@ --- title: "CA1417: Do not use OutAttribute on string parameters for P/Invokes (code analysis)" description: "Learn about code analysis rule CA1417: Do not use OutAttribute on string parameters for P/Invokes" -ms.date: 07/20/2020 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseOutAttributeStringPInvokeParameters" - "CA1417" @@ -19,7 +19,7 @@ ms.author: elfung | **Title** | Do not use `OutAttribute` on string parameters for P/Invokes | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1418.md b/docs/fundamentals/code-analysis/quality-rules/ca1418.md index 3d7d1b8a406ab..6bdd23b61f341 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1418.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1418.md @@ -1,7 +1,7 @@ --- title: "CA1418: Use valid platform string (code analysis)" description: "Learn about code analysis rule CA1418: Use valid platform string" -ms.date: 08/31/2021 +ms.date: 11/12/2026 f1_keywords: - "UseValidPlatformString" - "CA1418" @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Validate platform compatibility | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1419.md b/docs/fundamentals/code-analysis/quality-rules/ca1419.md index eab25602cdea3..16c3400f91a12 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1419.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1419.md @@ -1,7 +1,7 @@ --- title: "CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' (code analysis)" description: "Learn about code analysis rule CA1419: Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - "ProvidePublicParameterlessSafeHandleConstructorAnalyzer" - "CA1419" @@ -18,7 +18,7 @@ author: Youssef1313 | **Title** | Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1420.md b/docs/fundamentals/code-analysis/quality-rules/ca1420.md index ad05b551ef020..b7df4d4008707 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1420.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1420.md @@ -1,7 +1,7 @@ --- title: "CA1420: Property, type, or attribute requires runtime marshalling" description: "Learn about code analysis rule CA1420: Property, type, or attribute requires runtime marshalling" -ms.date: 11/03/2022 +ms.date: 11/12/2026 f1_keywords: - CA1420 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Property, type, or attribute requires runtime marshalling | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1421.md b/docs/fundamentals/code-analysis/quality-rules/ca1421.md index dc3212dee3819..1b658a8900e8d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1421.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1421.md @@ -1,7 +1,7 @@ --- title: "CA1421: Method uses runtime marshalling when 'DisableRuntimeMarshallingAttribute' is applied" description: "Learn about code analysis rule CA1421: Method uses runtime marshalling when 'DisableRuntimeMarshallingAttribute' is applied" -ms.date: 11/16/2022 +ms.date: 11/12/2026 f1_keywords: - CA1421 - MethodUsesRuntimeMarshallingEvenWhenMarshallingDisabled @@ -19,7 +19,7 @@ dev_langs: | **Title** | Method uses runtime marshalling when DisableRuntimeMarshallingAttribute is applied | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1422.md b/docs/fundamentals/code-analysis/quality-rules/ca1422.md index 0b8784b5c02eb..2d009664ed5c9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1422.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1422.md @@ -1,7 +1,7 @@ --- title: "CA1422: Validate platform compatibility" description: "Learn about code analysis rule CA1422: Validate platform compatibility for obsoleted APIs" -ms.date: 11/03/2022 +ms.date: 11/12/2026 f1_keywords: - CA1422 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Validate platform compatibility - obsoleted APIs | | **Category** | [Interoperability](interoperability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1501.md b/docs/fundamentals/code-analysis/quality-rules/ca1501.md index 91ba1fe06e9d8..5da280e801449 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1501.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1501.md @@ -1,7 +1,7 @@ --- title: "CA1501: Avoid excessive inheritance (code analysis)" description: "Learn about code analysis rule CA1501: Avoid excessive inheritance" -ms.date: 11/09/2022 +ms.date: 11/12/2026 f1_keywords: - CA1501 - AvoidExcessiveInheritance @@ -23,7 +23,7 @@ dev_langs: | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | | **Default threshold** | 5 | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1502.md b/docs/fundamentals/code-analysis/quality-rules/ca1502.md index a2373c3c4bee9..9d9d00753e29a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1502.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1502.md @@ -1,7 +1,7 @@ --- title: "CA1502: Avoid excessive complexity (code analysis)" description: "Learn about code analysis rule CA1502: Avoid excessive complexity" -ms.date: 11/09/2022 +ms.date: 11/12/2026 f1_keywords: - AvoidExcessiveComplexity - CA1502 @@ -23,7 +23,7 @@ dev_langs: | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | | **Default threshold** | 25 | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1505.md b/docs/fundamentals/code-analysis/quality-rules/ca1505.md index 542f6029c81e6..398d01ff54c59 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1505.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1505.md @@ -1,7 +1,7 @@ --- title: "CA1505: Avoid unmaintainable code (code analysis)" description: "Learn about code analysis rule CA1505: Avoid unmaintainable code" -ms.date: 11/09/2022 +ms.date: 11/12/2026 f1_keywords: - AvoidUnmaintainableCode - CA1505 @@ -20,7 +20,7 @@ ms.author: gewarren | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | | **Default threshold** | 10 | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1506.md b/docs/fundamentals/code-analysis/quality-rules/ca1506.md index 41daa90cbb036..e0db9722abb43 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1506.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1506.md @@ -1,7 +1,7 @@ --- title: "CA1506: Avoid excessive class coupling (code analysis)" description: "Learn about code analysis rule CA1506: Avoid excessive class coupling" -ms.date: 11/09/2022 +ms.date: 11/12/2026 f1_keywords: - AvoidExcessiveClassCoupling - CA1506 @@ -18,7 +18,7 @@ helpviewer_keywords: | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | | **Default threshold** | Types: 95  Other symbols: 40 | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1507.md b/docs/fundamentals/code-analysis/quality-rules/ca1507.md index e46320f28e04f..f307298cc8dc4 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1507.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1507.md @@ -1,7 +1,7 @@ --- title: "CA1507: Use nameof instead of string (code analysis)" description: "Learn about code analysis rule CA1507: Use nameof instead of string" -ms.date: 12/14/2023 +ms.date: 11/12/2026 f1_keywords: - UseNameofInPlaceOfString - CA1507 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Use `nameof` in place of string | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1508.md b/docs/fundamentals/code-analysis/quality-rules/ca1508.md index 40656ec896d8c..b7bff92c61f5c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1508.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1508.md @@ -1,7 +1,7 @@ --- title: "CA1508: Avoid dead conditional code (code analysis)" description: "Learn about code analysis rule CA1508: Avoid dead conditional code" -ms.date: 04/23/2020 +ms.date: 11/12/2026 f1_keywords: - "CA1508" - "AvoidDeadConditionalCode" @@ -18,7 +18,7 @@ author: mavasani | **Title** | Avoid dead conditional code | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1509.md b/docs/fundamentals/code-analysis/quality-rules/ca1509.md index 876eee8ff059f..cb499aad7c508 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1509.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1509.md @@ -1,7 +1,7 @@ --- title: "CA1509: Invalid entry in code metrics configuration file (code analysis)" description: "Learn about code analysis rule CA1509: Invalid entry in code metrics configuration file" -ms.date: 09/10/2026 +ms.date: 11/12/2026 ai-usage: ai-assisted f1_keywords: - CA1509 @@ -19,7 +19,7 @@ author: mavasani | **Title** | Invalid entry in code metrics configuration file | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | > [!NOTE] diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1510.md b/docs/fundamentals/code-analysis/quality-rules/ca1510.md index e60688b77cad5..d7e42752f4ee8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1510.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1510.md @@ -1,7 +1,7 @@ --- title: "CA1510: Use ArgumentNullException throw helper" description: "Learn about code analysis rule CA1510: Use ArgumentNullException throw helper" -ms.date: 11/16/2023 +ms.date: 11/12/2026 f1_keywords: - CA1510 helpviewer_keywords: @@ -15,7 +15,7 @@ helpviewer_keywords: | **Title** | Use ArgumentNullException throw helper | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1511.md b/docs/fundamentals/code-analysis/quality-rules/ca1511.md index 0e1215f74890e..fb44459c0f43a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1511.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1511.md @@ -1,7 +1,7 @@ --- title: "CA1511: Use ArgumentException throw helper" description: "Learn about code analysis rule CA1511: Use ArgumentException throw helper" -ms.date: 11/16/2023 +ms.date: 11/12/2026 f1_keywords: - CA1511 helpviewer_keywords: @@ -15,7 +15,7 @@ helpviewer_keywords: | **Title** | Use ArgumentException throw helper | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1512.md b/docs/fundamentals/code-analysis/quality-rules/ca1512.md index a98147462f206..601aefdc5ae7e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1512.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1512.md @@ -1,7 +1,7 @@ --- title: "CA1512: Use ArgumentOutOfRangeException throw helper" description: "Learn about code analysis rule CA1512: Use ArgumentOutOfRangeException throw helper" -ms.date: 11/16/2023 +ms.date: 11/12/2026 f1_keywords: - CA1512 helpviewer_keywords: @@ -15,7 +15,7 @@ helpviewer_keywords: | **Title** | Use ArgumentOutOfRangeException throw helper | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1513.md b/docs/fundamentals/code-analysis/quality-rules/ca1513.md index 49c2be939388d..881845e54a8fd 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1513.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1513.md @@ -1,7 +1,7 @@ --- title: "CA1513: Use ObjectDisposedException throw helper" description: "Learn about code analysis rule CA1513: Use ObjectDisposedException throw helper" -ms.date: 11/16/2023 +ms.date: 11/12/2026 f1_keywords: - CA1513 helpviewer_keywords: @@ -15,7 +15,7 @@ helpviewer_keywords: | **Title** | Use ObjectDisposedException throw helper | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1514.md b/docs/fundamentals/code-analysis/quality-rules/ca1514.md index a985beb03229e..d2828df0ea4de 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1514.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1514.md @@ -1,7 +1,7 @@ --- title: "CA1514: Avoid redundant length argument" description: "Learn about code analyzer rule CA1514 - Avoid redundant length argument" -ms.date: 09/23/2023 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1514 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Avoid redundant length argument | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1515.md b/docs/fundamentals/code-analysis/quality-rules/ca1515.md index 5f62671ce6b58..6e35e2c7128d5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1515.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1515.md @@ -1,7 +1,7 @@ --- title: "CA1515: Consider making public types internal" description: "Learn about code analyzer rule CA1515 - Consider making public types internal" -ms.date: 06/04/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1515 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Consider making public types internal | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1516.md b/docs/fundamentals/code-analysis/quality-rules/ca1516.md index 852035f938f2a..e321c189a740c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1516.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1516.md @@ -1,7 +1,7 @@ --- title: "CA1516: Use cross-platform intrinsics" description: "Learn about code analyzer rule CA1516 - Use cross-platform intrinsics" -ms.date: 07/09/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1516 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Use cross-platform intrinsics | | **Category** | [Maintainability](maintainability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1517.md b/docs/fundamentals/code-analysis/quality-rules/ca1517.md new file mode 100644 index 0000000000000..72869af984042 --- /dev/null +++ b/docs/fundamentals/code-analysis/quality-rules/ca1517.md @@ -0,0 +1,81 @@ +--- +title: "CA1517: Use 'ReadOnlySpan' or 'ReadOnlyMemory' instead of 'Span' or 'Memory' (code analysis)" +description: "Learn about code analysis rule CA1517: Use 'ReadOnlySpan' or 'ReadOnlyMemory' instead of 'Span' or 'Memory'" +ms.date: 11/12/2026 +f1_keywords: + - CA1517 + - PreferReadOnlySpanOverSpanAnalyzer +helpviewer_keywords: + - CA1517 +dev_langs: + - CSharp +ai-usage: ai-generated +--- + +# CA1517: Use `ReadOnlySpan` or `ReadOnlyMemory` instead of `Span` or `Memory` + +| Property | Value | +|-------------------------------------|-------| +| **Rule ID** | CA1517 | +| **Title** | Use `ReadOnlySpan` or `ReadOnlyMemory` instead of `Span` or `Memory` | +| **Category** | [Maintainability](maintainability-warnings.md) | +| **Fix is breaking or non-breaking** | Non-breaking | +| **Enabled by default in .NET 11** | As suggestion | +| **Applicable languages** | C# | + +## Cause + +A method has a `Span` or `Memory` parameter that it doesn't modify. + +## Rule description + +Use or for data that a method only reads. The read-only type makes the method's intent clear and lets callers pass data that they can't modify. + +## How to fix violations + +Change the parameter type to its read-only counterpart. The analyzer doesn't report methods that can't safely change their parameter type, such as virtual or interface methods. + +## Examples + +The following code shows a violation of CA1517: + +```csharp +static int GetFirst(Span values) => values[0]; +``` + +Change `Span` to `ReadOnlySpan`: + +```csharp +static int GetFirst(ReadOnlySpan values) => values[0]; +``` + +For `Memory` parameters, use `ReadOnlyMemory` instead. + +## When to suppress warnings + +Suppress the warning only when the method must expose a writable parameter, even though its current implementation doesn't modify the data. + +## Suppress a warning + +To suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule. + +```csharp +#pragma warning disable CA1517 +// The code that's violating the rule is on this line. +#pragma warning restore CA1517 +``` + +To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../configuration-files.md). + +```ini +[*.{cs,vb}] +dotnet_diagnostic.CA1517.severity = none +``` + +For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). + +## See also + +- [Maintainability rules](maintainability-warnings.md) +- +- diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1700.md b/docs/fundamentals/code-analysis/quality-rules/ca1700.md index 59712d26737e1..38e4c7001e0e5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1700.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1700.md @@ -1,7 +1,7 @@ --- title: "CA1700: Do not name enum values 'Reserved' (code analysis)" description: "Learn about code analysis rule CA1700: Do not name enum values 'Reserved'" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1700 - DoNotNameEnumValuesReserved @@ -21,7 +21,7 @@ dev_langs: | **Title** | Do not name enum values 'Reserved' | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1707.md b/docs/fundamentals/code-analysis/quality-rules/ca1707.md index 697a16ef604aa..627b89745679e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1707.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1707.md @@ -1,7 +1,7 @@ --- title: "CA1707: Identifiers should not contain underscores (code analysis)" description: "Learn about code analysis rule CA1707: Identifiers should not contain underscores" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - IdentifiersShouldNotContainUnderscores - CA1707 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Identifiers should not contain underscores | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking - when raised on assemblies

Non-breaking - when raised on type parameters | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1708.md b/docs/fundamentals/code-analysis/quality-rules/ca1708.md index 055e27225517f..5c91ae6f2bc33 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1708.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1708.md @@ -1,7 +1,7 @@ --- title: "CA1708: Identifiers should differ by more than case (code analysis)" description: "Learn about code analysis rule CA1708: Identifiers should differ by more than case" -ms.date: 12/08/2022 +ms.date: 11/12/2026 f1_keywords: - "IdentifiersShouldDifferByMoreThanCase" - "CA1708" @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Identifiers should differ by more than case | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1710.md b/docs/fundamentals/code-analysis/quality-rules/ca1710.md index 8a0ec764115af..78d894ed0c429 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1710.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1710.md @@ -1,7 +1,7 @@ --- title: "CA1710: Identifiers should have correct suffix (code analysis)" description: "Learn about code analysis rule CA1710: Identifiers should have correct suffix" -ms.date: 06/11/2020 +ms.date: 11/12/2026 f1_keywords: - CA1710 - IdentifiersShouldHaveCorrectSuffix @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Identifiers should have correct suffix | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1711.md b/docs/fundamentals/code-analysis/quality-rules/ca1711.md index cedd28c69bb5d..df92e99ed9bd8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1711.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1711.md @@ -1,7 +1,7 @@ --- title: "CA1711: Identifiers should not have incorrect suffix (code analysis)" description: "Learn about code analysis rule CA1711: Identifiers should not have incorrect suffix" -ms.date: 07/21/2020 +ms.date: 11/12/2026 f1_keywords: - CA1711 - IdentifiersShouldNotHaveIncorrectSuffix @@ -21,7 +21,7 @@ dev_langs: | **Title** | Identifiers should not have incorrect suffix | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1712.md b/docs/fundamentals/code-analysis/quality-rules/ca1712.md index 25fe48aa0ec08..88b06b6fd8eab 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1712.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1712.md @@ -1,7 +1,7 @@ --- title: "CA1712: Do not prefix enum values with type name (code analysis)" description: "Learn about code analysis rule CA1712: Do not prefix enum values with type name" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1712 - DoNotPrefixEnumValuesWithTypeName @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not prefix enum values with type name | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1713.md b/docs/fundamentals/code-analysis/quality-rules/ca1713.md index ae286831e7503..a0ae0016d9df6 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1713.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1713.md @@ -1,7 +1,7 @@ --- title: "CA1713: Events should not have before or after prefix (code analysis)" description: "Learn about code analysis rule CA1713: Events should not have before or after prefix" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - EventsShouldNotHaveBeforeOrAfterPrefix - CA1713 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Events should not have before or after prefix | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1714.md b/docs/fundamentals/code-analysis/quality-rules/ca1714.md index 40c7abff920dd..9bc0f92131683 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1714.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1714.md @@ -1,7 +1,7 @@ --- title: "CA1714: Flags enums should have plural names (code analysis)" description: "Learn about code analysis rule CA1714: Flags enums should have plural names" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - FlagsEnumsShouldHavePluralNames - CA1714 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Flags enums should have plural names | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1715.md b/docs/fundamentals/code-analysis/quality-rules/ca1715.md index 3e37158051321..be6b14431ed58 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1715.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1715.md @@ -1,7 +1,7 @@ --- title: "CA1715: Identifiers should have correct prefix (code analysis)" description: "Learn about code analysis rule CA1715: Identifiers should have correct prefix" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1715 - IdentifiersShouldHaveCorrectPrefix @@ -22,7 +22,7 @@ dev_langs: | **Title** | Identifiers should have correct prefix | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking - when fired on interfaces.

Non-breaking - when raised on generic type parameters. | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1716.md b/docs/fundamentals/code-analysis/quality-rules/ca1716.md index ab02ad8ac5093..63de958cf2df1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1716.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1716.md @@ -1,7 +1,7 @@ --- title: "CA1716: Identifiers should not match keywords (code analysis)" description: "Learn about code analysis rule CA1716: Identifiers should not match keywords" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - IdentifiersShouldNotMatchKeywords - CA1716 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Identifiers should not match keywords | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1717.md b/docs/fundamentals/code-analysis/quality-rules/ca1717.md index cb8e60c03878b..83da17e6a2daa 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1717.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1717.md @@ -1,7 +1,7 @@ --- title: "CA1717: Only FlagsAttribute enums should have plural names (code analysis)" description: "Learn about code analysis rule CA1717: Only FlagsAttribute enums should have plural names" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1717 - OnlyFlagsEnumsShouldHavePluralNames @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Only FlagsAttribute enums should have plural names | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1720.md b/docs/fundamentals/code-analysis/quality-rules/ca1720.md index ab68f735ffa4c..292a265b9d423 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1720.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1720.md @@ -1,7 +1,7 @@ --- title: "CA1720: Identifiers should not contain type names (code analysis)" description: "Learn about code analysis rule CA1720: Identifiers should not contain type names" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1720 - IdentifiersShouldNotContainTypeNames @@ -21,7 +21,7 @@ dev_langs: | **Title** | Identifiers should not contain type names | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1721.md b/docs/fundamentals/code-analysis/quality-rules/ca1721.md index ee3963d43c4eb..e093f65e406fd 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1721.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1721.md @@ -1,7 +1,7 @@ --- title: "CA1721: Property names should not match get methods (code analysis)" description: "Learn about code analysis rule CA1721: Property names should not match get methods" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1721 - PropertyNamesShouldNotMatchGetMethods @@ -22,7 +22,7 @@ dev_langs: | **Title** | Property names should not match get methods | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1724.md b/docs/fundamentals/code-analysis/quality-rules/ca1724.md index 988c8285972e0..5edc9aef7fd15 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1724.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1724.md @@ -1,7 +1,7 @@ --- title: "CA1724: Type Names Should Not Match Namespaces (code analysis)" description: "Learn about code analysis rule CA1724: Type Names Should Not Match Namespaces" -ms.date: 07/21/2020 +ms.date: 11/12/2026 f1_keywords: - TypeNamesShouldNotMatchNamespaces - CA1724 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Type names should not match namespaces | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1725.md b/docs/fundamentals/code-analysis/quality-rules/ca1725.md index c05f8ab76ffe3..2199386f983aa 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1725.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1725.md @@ -1,7 +1,7 @@ --- title: "CA1725: Parameter names should match base declaration (code analysis)" description: "Learn about code analysis rule CA1725: Parameter names should match base declaration" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - ParameterNamesShouldMatchBaseDeclaration - CA1725 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Parameter names should match base declaration | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1727.md b/docs/fundamentals/code-analysis/quality-rules/ca1727.md index 8c7f5e2ba5899..971a89b0975e9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1727.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1727.md @@ -1,7 +1,7 @@ --- title: "CA1727: Use PascalCase for named placeholders (code analysis)" description: "Learn about code analysis rule CA1727: Use PascalCase for named placeholders" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - LoggerMessageDefineAnalyzer - CA1727 @@ -20,7 +20,7 @@ dev_langs: | **Title** | Use PascalCase for named placeholders | | **Category** | [Naming](naming-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1801.md b/docs/fundamentals/code-analysis/quality-rules/ca1801.md index d116cd8c70fb5..3bf9de28db7b8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1801.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1801.md @@ -1,7 +1,7 @@ --- title: "CA1801: Review unused parameters (code analysis)" description: "Learn about code analysis rule CA1801: Review unused parameters" -ms.date: 06/24/2019 +ms.date: 11/12/2026 f1_keywords: - AvoidUnusedParameters - CA1801 @@ -20,7 +20,7 @@ ms.author: gewarren | **Title** | Review unused parameters | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking - If the member is not visible outside the assembly, regardless of the change you make.

Non-breaking - If you change the member to use the parameter within its body.

Breaking - If you remove the parameter and it is visible outside the assembly. | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1802.md b/docs/fundamentals/code-analysis/quality-rules/ca1802.md index a6fc818b5f057..f2e8eee0309ac 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1802.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1802.md @@ -1,7 +1,7 @@ --- title: "CA1802: Use Literals Where Appropriate (code analysis)" description: "Learn about code analysis rule CA1802: Use Literals Where Appropriate" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - UseLiteralsWhereAppropriate - CA1802 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Use Literals Where Appropriate | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1805.md b/docs/fundamentals/code-analysis/quality-rules/ca1805.md index 1764ea1d60992..100258261c486 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1805.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1805.md @@ -1,7 +1,7 @@ --- title: "CA1805: Do not initialize unnecessarily (code analysis)" description: "Learn about code analysis rule CA1805: Do not initialize unnecessarily" -ms.date: 06/29/2020 +ms.date: 11/12/2026 f1_keywords: - "DoNotInitializeUnnecessarily" - "CA1805" @@ -19,7 +19,7 @@ ms.author: stoub | **Title** | Do not initialize unnecessarily | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1806.md b/docs/fundamentals/code-analysis/quality-rules/ca1806.md index 1967793354c69..6f4cf65c1a706 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1806.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1806.md @@ -1,7 +1,7 @@ --- title: "CA1806: Do not ignore method results (code analysis)" description: "Learn about code analysis rule CA1806: Do not ignore method results" -ms.date: 10/30/2025 +ms.date: 11/12/2026 f1_keywords: - CA1806 - DoNotIgnoreMethodResults @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not ignore method results | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1810.md b/docs/fundamentals/code-analysis/quality-rules/ca1810.md index 9d37f90c8ccc4..df2d58001cfb2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1810.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1810.md @@ -1,7 +1,7 @@ --- title: "CA1810: Initialize reference type static fields inline (code analysis)" description: "Learn about code analysis rule CA1810: Initialize reference type static fields inline" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - InitializeReferenceTypeStaticFieldsInline - CA1810 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Initialize reference type static fields inline | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1812.md b/docs/fundamentals/code-analysis/quality-rules/ca1812.md index ac03aeb062112..8425e8354160e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1812.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1812.md @@ -1,7 +1,7 @@ --- title: "CA1812: Avoid uninstantiated internal classes (code analysis)" description: "Learn about code analysis rule CA1812: Avoid uninstantiated internal classes" -ms.date: 05/19/2023 +ms.date: 11/12/2026 f1_keywords: - CA1812 - AvoidUninstantiatedInternalClasses @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Avoid uninstantiated internal classes | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1813.md b/docs/fundamentals/code-analysis/quality-rules/ca1813.md index c004915845e0f..a8cf694824637 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1813.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1813.md @@ -1,7 +1,7 @@ --- title: "CA1813: Avoid unsealed attributes (code analysis)" description: "Learn about code analysis rule CA1813: Avoid unsealed attributes" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA1813 - AvoidUnsealedAttributes @@ -22,7 +22,7 @@ dev_langs: | **Title** | Avoid unsealed attributes | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1814.md b/docs/fundamentals/code-analysis/quality-rules/ca1814.md index eb56949af825a..d68167fd77d07 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1814.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1814.md @@ -1,7 +1,7 @@ --- title: "CA1814: Prefer jagged arrays over multidimensional (code analysis)" description: "Learn about code analysis rule CA1814: Prefer jagged arrays over multidimensional" -ms.date: 12/18/2020 +ms.date: 11/12/2026 f1_keywords: - PreferJaggedArraysOverMultidimensional - CA1814 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Prefer jagged arrays over multidimensional | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1815.md b/docs/fundamentals/code-analysis/quality-rules/ca1815.md index 96cc751f0a6d3..bf8b6e09e15ce 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1815.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1815.md @@ -1,7 +1,7 @@ --- title: "CA1815: Override equals and operator equals on value types (code analysis)" description: "Learn about code analysis rule CA1815: Override equals and operator equals on value types" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - CA1815 - OverrideEqualsAndOperatorEqualsOnValueTypes @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Override equals and operator equals on value types | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1816.md b/docs/fundamentals/code-analysis/quality-rules/ca1816.md index 694da5829cbed..e83479d1d0eec 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1816.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1816.md @@ -1,7 +1,7 @@ --- title: "CA1816: Call GC.SuppressFinalize correctly (code analysis)" description: "Learn about code analysis rule CA1816: Call GC.SuppressFinalize correctly" -ms.date: 06/30/2018 +ms.date: 11/12/2026 f1_keywords: - CA1816 - DisposeMethodsShouldCallSuppressFinalize @@ -22,7 +22,7 @@ dev_langs: | **Title** | Call GC.SuppressFinalize correctly | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1819.md b/docs/fundamentals/code-analysis/quality-rules/ca1819.md index 91db65a622d00..aed368836d849 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1819.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1819.md @@ -1,7 +1,7 @@ --- title: "CA1819: Properties should not return arrays (code analysis)" description: "Learn about code analysis rule CA1819: Properties should not return arrays" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - PropertiesShouldNotReturnArrays - CA1819 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Properties should not return arrays | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1820.md b/docs/fundamentals/code-analysis/quality-rules/ca1820.md index 75e1996c15dd0..8bc0a9db414db 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1820.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1820.md @@ -1,7 +1,7 @@ --- title: "CA1820: Test for empty strings using string length (code analysis)" description: "Learn about code analysis rule CA1820: Test for empty strings using string length" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - TestForEmptyStringsUsingStringLength - CA1820 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Test for empty strings using string length | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1821.md b/docs/fundamentals/code-analysis/quality-rules/ca1821.md index ec2627df2ba3a..66c137279c229 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1821.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1821.md @@ -1,7 +1,7 @@ --- title: "CA1821: Remove empty finalizers (code analysis)" description: "Learn about code analysis rule CA1821: Remove empty finalizers" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - RemoveEmptyFinalizers - CA1821 @@ -18,7 +18,7 @@ ms.author: gewarren | **Title** | Remove empty finalizers | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1822.md b/docs/fundamentals/code-analysis/quality-rules/ca1822.md index 1761bc1e34112..448a8c9545d72 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1822.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1822.md @@ -1,7 +1,7 @@ --- title: "CA1822: Mark members as static (code analysis)" description: "Learn about code analysis rule CA1822: Mark members as static" -ms.date: 03/30/2026 +ms.date: 11/12/2026 ai-usage: ai-assisted f1_keywords: - MarkMembersAsStatic @@ -22,7 +22,7 @@ dev_langs: | **Title** | Mark members as static | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking - If the member is not visible outside the assembly, regardless of the change you make.

Non-breaking - If you just change the member to an instance member with the `this` keyword.

Breaking - If you change the member from an instance member to a static member and it is visible outside the assembly. | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1823.md b/docs/fundamentals/code-analysis/quality-rules/ca1823.md index 1822e47d5153a..7b2aec03ddbf2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1823.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1823.md @@ -1,7 +1,7 @@ --- title: "CA1823: Avoid unused private fields (code analysis)" description: "Learn about code analysis rule CA1823: Avoid unused private fields" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - AvoidUnusedPrivateFields - CA1823 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Avoid unused private fields | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1824.md b/docs/fundamentals/code-analysis/quality-rules/ca1824.md index 9ef6abbe2a1ff..dc7796f38268d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1824.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1824.md @@ -1,7 +1,7 @@ --- title: "CA1824: Mark assemblies with NeutralResourcesLanguageAttribute (code analysis)" description: "Learn about code analysis rule CA1824: Mark assemblies with NeutralResourcesLanguageAttribute" -ms.date: 12/14/2023 +ms.date: 11/12/2026 f1_keywords: - CA1824 - MarkAssembliesWithNeutralResourcesLanguage @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Mark assemblies with NeutralResourcesLanguageAttribute | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1825.md b/docs/fundamentals/code-analysis/quality-rules/ca1825.md index 6af042da4691a..d3b4b428954ab 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1825.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1825.md @@ -1,7 +1,7 @@ --- title: "CA1825: Avoid zero-length array allocations (code analysis)" description: "Learn about code analysis rule CA1825: Avoid zero-length array allocations" -ms.date: 11/09/2022 +ms.date: 11/12/2026 f1_keywords: - "AvoidZeroLengthArrayAllocations" - "CA1825" @@ -20,7 +20,7 @@ dev_langs: | **Title** | Avoid zero-length array allocations | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1826.md b/docs/fundamentals/code-analysis/quality-rules/ca1826.md index 1bb7368161f9c..88fefed1c883a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1826.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1826.md @@ -1,7 +1,7 @@ --- title: "CA1826: Use property instead of Linq Enumerable method (code analysis)" description: "Learn about code analysis rule CA1826: Use property instead of Linq Enumerable method" -ms.date: 12/07/2022 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectlyAnalyzer" - "CA1826" @@ -18,7 +18,7 @@ author: mavasani | **Title** | Use property instead of Linq Enumerable method | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1827.md b/docs/fundamentals/code-analysis/quality-rules/ca1827.md index ddf3791571c5c..5930305b56594 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1827.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1827.md @@ -1,7 +1,7 @@ --- title: "CA1827: Do not use Count/LongCount when Any can be used (code analysis)" description: "Learn about code analysis rule CA1827: Do not use Count/LongCount when Any can be used" -ms.date: 07/17/2023 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseCountWhenAnyCanBeUsedAnalyzer" - "CA1827" @@ -18,7 +18,7 @@ author: mavasani | **Title** | Do not use Count()/LongCount() when Any() can be used | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1828.md b/docs/fundamentals/code-analysis/quality-rules/ca1828.md index 23c3e05780ec6..4e4c23ac4c647 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1828.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1828.md @@ -1,7 +1,7 @@ --- title: "CA1828: Do not use CountAsync/LongCountAsync when AnyAsync can be used (code analysis)" description: "Learn about code analysis rule CA1828: Do not use CountAsync/LongCountAsync when AnyAsync can be used" -ms.date: 04/24/2020 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseCountWhenAnyCanBeUsedAnalyzer" - "CA1828" @@ -18,7 +18,7 @@ author: mavasani | **Title** | Do not use CountAsync/LongCountAsync when AnyAsync can be used | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1829.md b/docs/fundamentals/code-analysis/quality-rules/ca1829.md index 47bb6f198be5d..ec19ac16d64ef 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1829.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1829.md @@ -1,7 +1,7 @@ --- title: "CA1829: Use Length/Count property instead of Enumerable.Count method (code analysis)" description: "Learn about code analysis rule CA1829: Use Length/Count property instead of Enumerable.Count method" -ms.date: 04/24/2020 +ms.date: 11/12/2026 f1_keywords: - "UsePropertyInsteadOfCountMethodWhenAvailableAnalyzer" - "CA1829" @@ -18,7 +18,7 @@ author: mavasani | **Title** | Use Length/Count property instead of Enumerable.Count method | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1830.md b/docs/fundamentals/code-analysis/quality-rules/ca1830.md index b42d10fd30856..54fdf9121b029 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1830.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1830.md @@ -1,7 +1,7 @@ --- title: "CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder (code analysis)" description: "Learn about code analysis rule CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder" -ms.date: 06/18/2020 +ms.date: 11/12/2026 f1_keywords: - "PreferTypedStringBuilderAppendOverloadsTitle" - "CA1830" @@ -19,7 +19,7 @@ ms.author: stoub | **Title** | Prefer strongly-typed Append and Insert method overloads on StringBuilder | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1831.md b/docs/fundamentals/code-analysis/quality-rules/ca1831.md index 81a245670041b..b55bbaeebc731 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1831.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1831.md @@ -1,7 +1,7 @@ --- title: "CA1831: Use AsSpan instead of Range-based indexers for string when appropriate (code analysis)" description: "Learn about code analysis rule CA1831: Use AsSpan instead of Range-based indexers for string when appropriate" -ms.date: 06/04/2020 +ms.date: 11/12/2026 f1_keywords: - "UseAsSpanInsteadOfStringRangeIndexer" - "CA1831" @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Use AsSpan instead of Range-based indexers for string when appropriate | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1832.md b/docs/fundamentals/code-analysis/quality-rules/ca1832.md index 06c0df06835f4..0f5afd25ed19c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1832.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1832.md @@ -1,7 +1,7 @@ --- title: "CA1832: Use AsSpan or AsMemory instead of Range-based indexers for getting ReadOnlySpan or ReadOnlyMemory portion of an array (code analysis)" description: "Learn about code analysis rule CA1832: Use AsSpan or AsMemory instead of Range-based indexers for getting ReadOnlySpan or ReadOnlyMemory portion of an array" -ms.date: 06/04/2020 +ms.date: 11/12/2026 f1_keywords: - "UseAsSpanInsteadOfStringRangeIndexer" - "CA1832" @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Use AsSpan or AsMemory instead of Range-based indexers for getting ReadOnlySpan or ReadOnlyMemory portion of an array | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1833.md b/docs/fundamentals/code-analysis/quality-rules/ca1833.md index 10e1fd09a5069..db77bb5720c6a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1833.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1833.md @@ -1,7 +1,7 @@ --- title: "CA1833: Use AsSpan or AsMemory instead of Range-based indexers for getting Span or Memory portion of an array (code analysis)" description: "Learn about code analysis rule CA1833: Use AsSpan or AsMemory instead of Range-based indexers for getting Span or Memory portion of an array" -ms.date: 06/04/2020 +ms.date: 11/12/2026 f1_keywords: - "UseAsSpanInsteadOfStringRangeIndexer" - "CA1833" @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Use AsSpan or AsMemory instead of Range-based indexers for getting Span or Memory portion of an array | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1834.md b/docs/fundamentals/code-analysis/quality-rules/ca1834.md index 8adac9c0e56e5..d86759bf91875 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1834.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1834.md @@ -1,7 +1,7 @@ --- title: "CA1834: Use StringBuilder.Append(char) for single character strings (code analysis)" description: "Learn about code analysis rule CA1834: Use StringBuilder.Append(char) for single character strings" -ms.date: 08/04/2020 +ms.date: 11/12/2026 f1_keywords: - "UseStringBuilderAppendChar" - "CA1834" @@ -18,7 +18,7 @@ author: pgovind | **Title** | Use StringBuilder.Append(char) for single character strings | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1835.md b/docs/fundamentals/code-analysis/quality-rules/ca1835.md index a6f480be871da..9697d7892017b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1835.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1835.md @@ -1,7 +1,7 @@ --- title: "CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes (code analysis)" description: "Learn about code analysis rule CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes" -ms.date: 05/11/2020 +ms.date: 11/12/2026 f1_keywords: - "PreferStreamAsyncMemoryOverloads" - "CA1835" @@ -22,7 +22,7 @@ dev_langs: | **Title** | Prefer the memory-based overloads of ReadAsync/WriteAsync methods in stream-based classes | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1836.md b/docs/fundamentals/code-analysis/quality-rules/ca1836.md index 133a0cd880e76..174a9a798e72c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1836.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1836.md @@ -1,7 +1,7 @@ --- title: "CA1836: Prefer IsEmpty over Count when available (code analysis)" description: "Learn about code analysis rule CA1836: Prefer IsEmpty over Count when available" -ms.date: 06/09/2020 +ms.date: 11/12/2026 f1_keywords: - "UseCountProperly" - "CA1836" @@ -19,7 +19,7 @@ ms.author: dacantu | **Title** | Prefer IsEmpty over Count when available | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1837.md b/docs/fundamentals/code-analysis/quality-rules/ca1837.md index 7436fb9d620bf..27c3cf889f1f6 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1837.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1837.md @@ -1,7 +1,7 @@ --- title: "CA1837: Use 'Environment.ProcessId' instead of 'Process.GetCurrentProcess().Id' (code analysis)" description: "Learn about code analysis rule CA1837: Use 'Environment.ProcessId' instead of 'Process.GetCurrentProcess().Id'" -ms.date: 08/27/2020 +ms.date: 11/12/2026 f1_keywords: - "UseEnvironmentProcessId" - "CA1837" @@ -22,7 +22,7 @@ dev_langs: | **Title** | Use Environment.ProcessId instead of Process.GetCurrentProcess().Id | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1838.md b/docs/fundamentals/code-analysis/quality-rules/ca1838.md index 901e80b2765b0..751f43880e943 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1838.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1838.md @@ -1,7 +1,7 @@ --- title: "CA1838: Avoid StringBuilder parameters for P/Invokes (code analysis)" description: "Learn about code analysis rule CA1838: Avoid StringBuilder parameters for P/Invokes" -ms.date: 08/03/2020 +ms.date: 11/12/2026 f1_keywords: - "AvoidStringBuilderPInvokeParameters" - "CA1838" @@ -20,7 +20,7 @@ ms.author: elfung | **Title** | Avoid `StringBuilder` parameters for P/Invokes | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1839.md b/docs/fundamentals/code-analysis/quality-rules/ca1839.md index 097b813a77de3..a92bf36c96e13 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1839.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1839.md @@ -1,7 +1,7 @@ --- title: "CA1839: Use 'Environment.ProcessPath'" description: "'Environment.ProcessPath' is simpler and faster than 'Process.GetCurrentProcess().MainModule.FileName'." -ms.date: 11/23/2021 +ms.date: 11/12/2026 f1_keywords: - "CA1839" helpviewer_keywords: @@ -20,7 +20,7 @@ dev_langs: | **Title** | Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1840.md b/docs/fundamentals/code-analysis/quality-rules/ca1840.md index 0c4b34cec972d..f0a500faafb7c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1840.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1840.md @@ -1,7 +1,7 @@ --- title: "CA1840: Use 'Environment.CurrentManagedThreadId'" description: "'Environment.CurrentManagedThreadId' is simpler and faster than 'Thread.CurrentThread.ManagedThreadId'." -ms.date: 11/23/2021 +ms.date: 11/12/2026 f1_keywords: - "CA1840" helpviewer_keywords: @@ -20,7 +20,7 @@ dev_langs: | **Title** | Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1841.md b/docs/fundamentals/code-analysis/quality-rules/ca1841.md index 3d7ea6410f09d..c6b31eba0e21c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1841.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1841.md @@ -1,7 +1,7 @@ --- title: "CA1841: Prefer Dictionary Contains methods (code analysis)" description: "Learn about code analysis rule CA1841: Prefer Dictionary Contains methods" -ms.date: 04/21/2021 +ms.date: 11/12/2026 f1_keywords: - "PreferDictionaryContainsMethods" - "CA1841" @@ -21,7 +21,7 @@ dev_langs: | **Title** | Prefer Dictionary Contains methods | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1842.md b/docs/fundamentals/code-analysis/quality-rules/ca1842.md index e9e4a13415190..3ba24dc41b257 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1842.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1842.md @@ -1,7 +1,7 @@ --- title: "CA1842: Do not use 'WhenAll' with a single task (code analysis)" description: "Learn about code analysis rule CA1842: Do not use 'WhenAll' with a single task" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseWhenAllOrWaitAllWithSingleArgument" - "CA1842" @@ -18,7 +18,7 @@ author: Youssef1313 | **Title** | Do not use 'WhenAll' with a single task | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1843.md b/docs/fundamentals/code-analysis/quality-rules/ca1843.md index 3c2fb0cfccc22..2e49a2cbfb2dc 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1843.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1843.md @@ -1,7 +1,7 @@ --- title: "CA1843: Do not use 'WaitAll' with a single task (code analysis)" description: "Learn about code analysis rule CA1843: Do not use 'WaitAll' with a single task" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseWhenAllOrWaitAllWithSingleArgument" - "CA1843" @@ -18,7 +18,7 @@ author: Youssef1313 | **Title** | Do not use 'WaitAll' with a single task | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1844.md b/docs/fundamentals/code-analysis/quality-rules/ca1844.md index 1c858e5145d53..fa80c659c3075 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1844.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1844.md @@ -1,7 +1,7 @@ --- title: "CA1844: Provide memory-based overrides of async methods when subclassing 'Stream' (code analysis)" description: "Learn about code analysis rule CA1844: Provide memory-based overrides of async methods when subclassing 'Stream'" -ms.date: 05/18/2021 +ms.date: 11/12/2026 f1_keywords: - CA1844 - ProvideStreamMemoryBasedAsyncOverrides @@ -20,7 +20,7 @@ dev_langs: | **Title** | Provide memory-based overrides of async methods when subclassing 'Stream' | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1845.md b/docs/fundamentals/code-analysis/quality-rules/ca1845.md index 939f4f7554f4d..6d42bd2d610d0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1845.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1845.md @@ -1,7 +1,7 @@ --- title: "CA1845: Use span-based 'string.Concat' (analysis rule)" description: "Learn about code analysis rule CA1845: Use span-based 'string.Concat'" -ms.date: 05/18/2021 +ms.date: 11/12/2026 f1_keywords: - "UseSpanBasedStringConcat" - "CA1845" @@ -20,7 +20,7 @@ dev_langs: | **Title** | Use span-based 'string.Concat' | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1846.md b/docs/fundamentals/code-analysis/quality-rules/ca1846.md index a1e61128cbc5e..dfab40efc6554 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1846.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1846.md @@ -1,7 +1,7 @@ --- title: "CA1846: Prefer AsSpan over Substring" description: "Learn about code analysis rule CA1846: Prefer AsSpan over Substring" -ms.date: 05/21/2021 +ms.date: 11/12/2026 f1_keywords: - CA1846 - PreferAsSpanOverSubstring @@ -21,7 +21,7 @@ dev_langs: | **Title** | Prefer `AsSpan` over `Substring` | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1847.md b/docs/fundamentals/code-analysis/quality-rules/ca1847.md index da7f94f20dff1..20ac61e2958a6 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1847.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1847.md @@ -1,7 +1,7 @@ --- title: "CA1847: Use char literal for a single character lookup" description: "Use String.Contains(char) instead of String.Contains(string) when searching for a single character" -ms.date: 03/03/2021 +ms.date: 11/12/2026 f1_keywords: - "CA1847" helpviewer_keywords: @@ -20,7 +20,7 @@ dev_langs: | **Title** | Use String.Contains(char) instead of String.Contains(string) with single characters | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1848.md b/docs/fundamentals/code-analysis/quality-rules/ca1848.md index ec3d990b126e1..72d748dbbfea9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1848.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1848.md @@ -1,7 +1,7 @@ --- title: "CA1848: Use the LoggerMessage delegates (code analysis)" description: "Learn about code analysis rule CA1848: Use the LoggerMessage delegates" -ms.date: 08/04/2025 +ms.date: 11/12/2026 f1_keywords: - "LoggerMessageDefineAnalyzer" - "CA1848" @@ -18,7 +18,7 @@ author: Youssef1313 | **Title** | Use the LoggerMessage delegates | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1849.md b/docs/fundamentals/code-analysis/quality-rules/ca1849.md index 0433cadaa761b..e913a66712ce0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1849.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1849.md @@ -1,7 +1,7 @@ --- title: "CA1849: Call async methods when in an async method" description: "Learn about code analysis rule CA1849: Call async methods when in an async method" -ms.date: 08/27/2021 +ms.date: 11/12/2026 f1_keywords: - "CA1849" - "UseAsyncMethodInAsyncContext" @@ -18,7 +18,7 @@ author: mahdiva | **Title** | Call async methods when in an async method | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1850.md b/docs/fundamentals/code-analysis/quality-rules/ca1850.md index b367b6abb02d1..0d4f946187fe2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1850.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1850.md @@ -1,7 +1,7 @@ --- title: "CA1850: Prefer static HashData method over ComputeHash" description: "It is more efficient to use the static HashData method over creating and managing a HashAlgorithm instance to call ComputeHash" -ms.date: 10/23/2021 +ms.date: 11/12/2026 f1_keywords: - "CA1850" helpviewer_keywords: @@ -20,7 +20,7 @@ dev_langs: | **Title** | Prefer static `HashData` method over `ComputeHash` | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1851.md b/docs/fundamentals/code-analysis/quality-rules/ca1851.md index 2282a79e48123..6e30100c5aa60 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1851.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1851.md @@ -1,7 +1,7 @@ --- title: "CA1851: Possible multiple enumerations of 'IEnumerable' collection" description: "Learn about code analyzer rule CA1851 - multiple enumerations of 'IEnumerable' collection." -ms.date: 09/01/2022 +ms.date: 11/12/2026 f1_keywords: - CA1851 helpviewer_keywords: @@ -20,7 +20,7 @@ dev_langs: | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | | **Introduced version** | .NET 7 | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1852.md b/docs/fundamentals/code-analysis/quality-rules/ca1852.md index e58f05a1db681..2544b6434e82d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1852.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1852.md @@ -1,7 +1,7 @@ --- title: "CA1852: Seal internal types" description: "Learn about code analyzer rule CA1852 - Seal internal types." -ms.date: 05/19/2023 +ms.date: 11/12/2026 f1_keywords: - CA1852 - SealInternalTypes @@ -21,7 +21,7 @@ dev_langs: | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | | **Introduced version** | .NET 7 | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1853.md b/docs/fundamentals/code-analysis/quality-rules/ca1853.md index daa708dfa7899..42b59092acb89 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1853.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1853.md @@ -1,7 +1,7 @@ --- title: "CA1853: Unnecessary call to 'Dictionary.ContainsKey(key)'" description: "Learn about code analyzer rule CA1853 - Unnecessary call to 'Dictionary.ContainsKey(key)'." -ms.date: 11/16/2022 +ms.date: 11/12/2026 f1_keywords: - CA1853 - DoNotGuardDictionaryRemoveByContainsKey @@ -21,7 +21,7 @@ dev_langs: | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | | **Introduced version** | .NET 7 | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1854.md b/docs/fundamentals/code-analysis/quality-rules/ca1854.md index 49efd926085c7..b84fef97bf753 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1854.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1854.md @@ -1,7 +1,7 @@ --- title: "CA1854: Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method" description: "Learn about code analyzer rule CA1854 - Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method" -ms.date: 06/01/2022 +ms.date: 11/12/2026 f1_keywords: - CA1854 helpviewer_keywords: @@ -21,7 +21,7 @@ dev_langs: | **Title** | Prefer the `IDictionary.TryGetValue(TKey, out TValue)` method | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1855.md b/docs/fundamentals/code-analysis/quality-rules/ca1855.md index da9d4be31826d..f5672280d7b1f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1855.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1855.md @@ -1,7 +1,7 @@ --- title: "CA1855: Use Span.Clear() instead of Fill()" description: "Learn about code analyzer rule CA1855 - Use Span.Clear() instead of Fill()" -ms.date: 11/16/2022 +ms.date: 11/12/2026 f1_keywords: - CA1855 - UseSpanClearInsteadOfFillAnalyzer @@ -19,7 +19,7 @@ dev_langs: | **Title** | Use Span\.Clear() instead of Span\.Fill() | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1856.md b/docs/fundamentals/code-analysis/quality-rules/ca1856.md index 41ee5f3874016..521c730f73653 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1856.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1856.md @@ -1,7 +1,7 @@ --- title: "CA1856: Incorrect usage of ConstantExpected attribute" description: "Learn about code analyzer rule CA1856 - Incorrect usage of ConstantExpected attribute" -ms.date: 11/15/2023 +ms.date: 11/12/2026 f1_keywords: - CA1856 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Incorrect usage of ConstantExpected attribute | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As error | +| **Enabled by default in .NET 11** | As error | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1857.md b/docs/fundamentals/code-analysis/quality-rules/ca1857.md index f62f767fa939c..f976683663cf1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1857.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1857.md @@ -1,7 +1,7 @@ --- title: "CA1857: The parameter expects a constant for optimal performance" description: "Learn about code analyzer rule CA1857 - The parameter expects a constant for optimal performance" -ms.date: 11/15/2023 +ms.date: 11/12/2026 f1_keywords: - CA1857 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | The parameter expects a constant for optimal performance | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1858.md b/docs/fundamentals/code-analysis/quality-rules/ca1858.md index 9c2154c6d7e96..c3a2e6cbbe4b9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1858.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1858.md @@ -1,7 +1,7 @@ --- title: "CA1858: Use StartsWith instead of IndexOf" description: "Learn about code analyzer rule CA1858 - Use StartsWith instead of IndexOf" -ms.date: 12/20/2022 +ms.date: 11/12/2026 f1_keywords: - CA1858 - UseStartsWithInsteadOfIndexOfComparisonWithZero @@ -20,7 +20,7 @@ dev_langs: | **Title** | Use StartsWith instead of IndexOf | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1859.md b/docs/fundamentals/code-analysis/quality-rules/ca1859.md index 7a8706ef12217..d287da7a4a16f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1859.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1859.md @@ -1,7 +1,7 @@ --- title: "CA1859: Use concrete types when possible for improved performance" description: "Learn about code analyzer rule CA1859 - Use concrete types when possible for improved performance." -ms.date: 05/01/2023 +ms.date: 11/12/2026 f1_keywords: - CA1859 - UseConcreteTypes @@ -18,7 +18,7 @@ helpviewer_keywords: | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | | **Introduced version** | .NET 8 | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1860.md b/docs/fundamentals/code-analysis/quality-rules/ca1860.md index 3ff982cb4ee2a..38e95f244acfe 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1860.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1860.md @@ -1,7 +1,7 @@ --- title: "CA1860: Avoid using 'Enumerable.Any()' extension method" description: "Learn about code analyzer rule CA1860 - Avoid using 'Enumerable.Any()' extension method" -ms.date: 07/17/2023 +ms.date: 11/12/2026 f1_keywords: - CA1860 - PreferLengthCountIsEmptyOverAnyAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | Avoid using 'Enumerable.Any()' extension method | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1861.md b/docs/fundamentals/code-analysis/quality-rules/ca1861.md index 86d986347099f..f04f5eb0d54be 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1861.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1861.md @@ -1,7 +1,7 @@ --- title: "CA1861: Avoid constant arrays as arguments (code analysis)" description: "Learn about code analysis rule CA1861: Avoid constant arrays as arguments" -ms.date: 05/10/2023 +ms.date: 11/12/2026 f1_keywords: - "AvoidConstArrays" - "CA1861" @@ -22,7 +22,7 @@ dev_langs: | **Title** | Avoid constant arrays as arguments | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1862.md b/docs/fundamentals/code-analysis/quality-rules/ca1862.md index 7ab0f0df8fff1..13fa94fbc3951 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1862.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1862.md @@ -1,7 +1,7 @@ --- title: "CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons" description: "Learn about code analysis rule CA1862: Use the 'StringComparison' method overloads to perform case-insensitive string comparisons" -ms.date: 11/21/2023 +ms.date: 11/12/2026 f1_keywords: - "CA1862" helpviewer_keywords: @@ -19,7 +19,7 @@ dev_langs: | **Title** | Use the 'StringComparison' method overloads to perform case-insensitive string comparisons | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1863.md b/docs/fundamentals/code-analysis/quality-rules/ca1863.md index 506cd600a4f70..59996d1981ae9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1863.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1863.md @@ -1,7 +1,7 @@ --- title: "CA1863: Use 'CompositeFormat'" description: "Learn about code analysis rule CA1863: Use 'CompositeFormat'" -ms.date: 11/20/2023 +ms.date: 11/12/2026 f1_keywords: - "CA1863" helpviewer_keywords: @@ -16,7 +16,7 @@ helpviewer_keywords: | **Title** | Use `CompositeFormat` | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1864.md b/docs/fundamentals/code-analysis/quality-rules/ca1864.md index ae48e55e55cc1..ee4e1beee6592 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1864.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1864.md @@ -1,7 +1,7 @@ --- title: "CA1864: Prefer the 'Dictionary.TryAdd(TKey, TValue)' method" description: "Learn about code analyzer rule CA1864 - Prefer the 'Dictionary.TryAdd(TKey, TValue)' method" -ms.date: 06/30/2023 +ms.date: 11/12/2026 f1_keywords: - CA1864 - PreferDictionaryTryMethodsOverContainsKeyGuardAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | Prefer the 'Dictionary.TryAdd(TKey, TValue)' method | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1865-ca1867.md b/docs/fundamentals/code-analysis/quality-rules/ca1865-ca1867.md index c40a5bccac011..d6a8934120a32 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1865-ca1867.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1865-ca1867.md @@ -1,7 +1,7 @@ --- title: "CA1865-CA1867: Use char overload" description: "Use 'string.Method(char)' instead of 'string.Method(string)' when you have a string with a single char" -ms.date: 07/27/2023 +ms.date: 11/12/2026 f1_keywords: - CA1865 - CA1866 @@ -24,7 +24,7 @@ author: mrahhal | **Title** | Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | CA1865—As suggestion
CA1866—As suggestion
CA1867—No | +| **Enabled by default in .NET 11** | CA1865—As suggestion
CA1866—As suggestion
CA1867—No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1868.md b/docs/fundamentals/code-analysis/quality-rules/ca1868.md index 281a9a8fbbc43..e55591c918970 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1868.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1868.md @@ -1,7 +1,7 @@ --- title: "CA1868: Unnecessary call to 'Contains' for sets" description: "Learn about code analyzer rule CA1868 - Unnecessary call to 'Contains' for sets" -ms.date: 07/25/2023 +ms.date: 11/12/2026 f1_keywords: - CA1868 - DoNotGuardSetAddOrRemoveByContainsAnalyzer @@ -21,7 +21,7 @@ dev_langs: | **Title** | Unnecessary call to 'Contains' for sets | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1869.md b/docs/fundamentals/code-analysis/quality-rules/ca1869.md index f16a35129c92f..74f006ee75e66 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1869.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1869.md @@ -1,7 +1,7 @@ --- title: "CA1869: Cache and reuse 'JsonSerializerOptions' instances" description: "Learn about code analyzer rule CA1869 - Cache and reuse 'JsonSerializerOptions' instances" -ms.date: 08/21/2023 +ms.date: 11/12/2026 f1_keywords: - CA1869 - AvoidSingleUseOfLocalJsonSerializerOptions @@ -19,7 +19,7 @@ ms.author: dacantu | **Title** | Cache and reuse 'JsonSerializerOptions' instances | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1870.md b/docs/fundamentals/code-analysis/quality-rules/ca1870.md index 2d843a5af8dd2..33a90cbc9143d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1870.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1870.md @@ -1,7 +1,7 @@ --- title: "CA1870: Use a cached 'SearchValues' instance" description: "Learn about code analyzer rule CA1870 - Use a cached 'SearchValues' instance" -ms.date: 09/12/2023 +ms.date: 11/12/2026 f1_keywords: - CA1870 - UseSearchValuesAnalyzer @@ -21,7 +21,7 @@ ms.author: mizupan | **Title** | Use a cached 'SearchValues' instance | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1871.md b/docs/fundamentals/code-analysis/quality-rules/ca1871.md index 12168e36ff8dc..3d35e9025f254 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1871.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1871.md @@ -1,7 +1,7 @@ --- title: "CA1871: Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'" description: "Learn about code analyzer rule CA1871 - Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull'" -ms.date: 02/25/2024 +ms.date: 11/12/2026 f1_keywords: - CA1871 - DoNotPassNonNullableValueToArgumentNullExceptionThrowIfNull @@ -20,7 +20,7 @@ author: CollinAlpert | **Title** | Do not pass a nullable struct to 'ArgumentNullException.ThrowIfNull' | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As information | +| **Enabled by default in .NET 11** | As information | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1872.md b/docs/fundamentals/code-analysis/quality-rules/ca1872.md index 37c27dcc2cbf1..47a363bdc7712 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1872.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1872.md @@ -1,7 +1,7 @@ --- title: "CA1872: Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString' (code analysis)" description: "Learn about code analyzer rule CA1872 - Prefer 'Convert.ToHexString' and 'Convert.ToHexStringLower' over call chains based on 'BitConverter.ToString'" -ms.date: 03/21/2024 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1872 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Prefer `Convert.ToHexString` and `Convert.ToHexStringLower` over call chains based on `BitConverter.ToString` | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1873.md b/docs/fundamentals/code-analysis/quality-rules/ca1873.md index 811a54fcf2113..26dc4c18fc4ba 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1873.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1873.md @@ -1,7 +1,7 @@ --- title: "CA1873: Avoid potentially expensive logging (code analysis)" description: "Learn about code analysis rule CA1873: Avoid potentially expensive logging" -ms.date: 10/27/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1873 @@ -22,7 +22,7 @@ ai-usage: ai-generated | **Title** | Avoid potentially expensive logging | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | In the .NET 10 SDK, CA1873 is enabled as a suggestion with the default analysis level for .NET 10. If you set [`AnalysisLevel`](../../../core/project-sdk/msbuild-props.md#analysislevel) to `8` or `9`, the default configuration for that level disables the rule. diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1874.md b/docs/fundamentals/code-analysis/quality-rules/ca1874.md index 5162da5bba44d..823bd65c349b2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1874.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1874.md @@ -1,7 +1,7 @@ --- title: "CA1874: Use 'Regex.IsMatch' (code analysis)" description: "Learn about code analysis rule CA1874: Use 'Regex.IsMatch'" -ms.date: 10/27/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1874 @@ -22,7 +22,7 @@ ai-usage: ai-generated | **Title** | Use `Regex.IsMatch` | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1875.md b/docs/fundamentals/code-analysis/quality-rules/ca1875.md index 43712f06cf495..6ad5f35fff6a3 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1875.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1875.md @@ -1,7 +1,7 @@ --- title: "CA1875: Use 'Regex.Count' (code analysis)" description: "Learn about code analysis rule CA1875: Use 'Regex.Count'" -ms.date: 10/27/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1875 @@ -22,7 +22,7 @@ ai-usage: ai-generated | **Title** | Use `Regex.Count` | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1876.md b/docs/fundamentals/code-analysis/quality-rules/ca1876.md new file mode 100644 index 0000000000000..8c55282749761 --- /dev/null +++ b/docs/fundamentals/code-analysis/quality-rules/ca1876.md @@ -0,0 +1,99 @@ +--- +title: "CA1876: Do not use 'AsParallel' in 'foreach' (code analysis)" +description: "Learn about code analysis rule CA1876: Do not use 'AsParallel' in 'foreach'" +ms.date: 11/12/2026 +f1_keywords: + - CA1876 + - DoNotUseAsParallelInForEachLoopAnalyzer +helpviewer_keywords: + - CA1876 +dev_langs: + - CSharp + - VB +ai-usage: ai-generated +--- + +# CA1876: Do not use 'AsParallel' in 'foreach' + +| Property | Value | +|-------------------------------------|-------| +| **Rule ID** | CA1876 | +| **Title** | Do not use `AsParallel` in `foreach` | +| **Category** | [Performance](performance-warnings.md) | +| **Fix is breaking or non-breaking** | Non-breaking | +| **Enabled by default in .NET 11** | As suggestion | +| **Applicable languages** | C# and Visual Basic | + +## Cause + +A `foreach` loop enumerates the result of calling `AsParallel()` directly. + +## Rule description + +The `foreach` statement processes each item serially. Calling on the collection doesn't make the loop run in parallel. + +## How to fix violations + +Remove `AsParallel()` if the loop should run serially. To process each item in parallel, use . To parallelize LINQ query operations, call `AsParallel()` before those operations, then enumerate the query or call `ForAll`. + +## Examples + +The following code shows a violation of CA1876: + +```csharp +var values = new[] { 1, 2, 3 }; +foreach (var value in values.AsParallel()) + Console.WriteLine(value); +``` + +To process each item in parallel, use `Parallel.ForEach`. Use this approach only when the work can run concurrently; it doesn't preserve item order. + +```csharp +var values = new[] { 1, 2, 3 }; +Parallel.ForEach(values, value => Console.WriteLine(value)); +``` + +The following Visual Basic code shows a violation: + +```vb +Dim values = {1, 2, 3} +For Each value In values.AsParallel() + Console.WriteLine(value) +Next +``` + +To process each item in parallel, use `Parallel.ForEach`: + +```vb +Dim values = {1, 2, 3} +Parallel.ForEach(values, Sub(value) Console.WriteLine(value)) +``` + +## When to suppress warnings + +Suppress the warning only when you use `AsParallel()` for another reason. The `foreach` loop itself still runs serially. + +## Suppress a warning + +To suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule. + +```csharp +#pragma warning disable CA1876 +// The code that's violating the rule is on this line. +#pragma warning restore CA1876 +``` + +To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../configuration-files.md). + +```ini +[*.{cs,vb}] +dotnet_diagnostic.CA1876.severity = none +``` + +For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). + +## See also + +- [Performance rules](performance-warnings.md) +- +- diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1877.md b/docs/fundamentals/code-analysis/quality-rules/ca1877.md index f5bdccacb84fa..77b5c78ddf0f1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1877.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1877.md @@ -1,7 +1,7 @@ --- title: "CA1877: Use 'Path.Combine' or 'Path.Join' overloads (code analysis)" description: "Learn about code analysis rule CA1877: Use 'Path.Combine' or 'Path.Join' overloads" -ms.date: 11/05/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1877 @@ -22,7 +22,7 @@ ai-usage: ai-generated | **Title** | Use `Path.Combine` or `Path.Join` overloads | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca1878.md b/docs/fundamentals/code-analysis/quality-rules/ca1878.md index 3185a5cb2909c..ba7f7e4926df0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca1878.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca1878.md @@ -1,7 +1,7 @@ --- title: "CA1878: Prefer ReadOnlySpan properties over readonly array fields (code analysis)" description: "Learn about code analysis rule CA1878: Prefer ReadOnlySpan properties over readonly array fields" -ms.date: 08/24/2026 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA1878 @@ -22,7 +22,7 @@ ai-usage: ai-assisted | **Title** | Prefer ReadOnlySpan properties over readonly array fields | | **Category** | [Performance](performance-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 11** | As suggestion | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2000.md b/docs/fundamentals/code-analysis/quality-rules/ca2000.md index 7ce458a6dfcba..53c956dd418e7 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2000.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2000.md @@ -1,7 +1,7 @@ --- title: "CA2000: Dispose objects before losing scope (code analysis)" description: "Learn about code analysis rule CA2000: Dispose objects before losing scope" -ms.date: 02/01/2025 +ms.date: 11/12/2026 f1_keywords: - CA2000 - Dispose objects before losing scope @@ -23,7 +23,7 @@ dev_langs: | **Title** | Dispose objects before losing scope | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2002.md b/docs/fundamentals/code-analysis/quality-rules/ca2002.md index 7d2a1f083467e..9abcfb45d6de9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2002.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2002.md @@ -1,7 +1,7 @@ --- title: "CA2002: Do not lock on objects with weak identity (code analysis)" description: "Learn about code analysis rule CA2002: Do not lock on objects with weak identity" -ms.date: 01/31/2018 +ms.date: 11/12/2026 f1_keywords: - DoNotLockOnObjectsWithWeakIdentity - CA2002 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not lock on objects with weak identity | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2007.md b/docs/fundamentals/code-analysis/quality-rules/ca2007.md index 98b841f371b73..686f5a2c84285 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2007.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2007.md @@ -1,7 +1,7 @@ --- title: "CA2007: Do not directly await a Task (code analysis)" description: "Learn about code analysis rule CA2007: Do not directly await a Task" -ms.date: 03/08/2019 +ms.date: 11/12/2026 f1_keywords: - CA2007 - DoNotDirectlyAwaitATaskAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | Do not directly await a Task | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2008.md b/docs/fundamentals/code-analysis/quality-rules/ca2008.md index 3dc86efd8fc68..f25608578a970 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2008.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2008.md @@ -1,7 +1,7 @@ --- title: "CA2008: Do not create tasks without passing a TaskScheduler (code analysis)" description: "Learn about code analysis rule CA2008: Do not create tasks without passing a TaskScheduler" -ms.date: 08/26/2020 +ms.date: 11/12/2026 f1_keywords: - CA2008 - DoNotCreateTasksWithoutPassingATaskSchedulerAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | Do not create tasks without passing a TaskScheduler | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2009.md b/docs/fundamentals/code-analysis/quality-rules/ca2009.md index ce371b0fe3824..d977a81084ff0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2009.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2009.md @@ -1,7 +1,7 @@ --- title: "CA2009: Do not call ToImmutableCollection on an ImmutableCollection value (code analysis)" description: "Learn about code analysis rule CA2009: Do not call ToImmutableCollection on an ImmutableCollection value" -ms.date: 04/29/2020 +ms.date: 11/12/2026 f1_keywords: - CA2009 - DoNotCallToImmutableCollectionOnAnImmutableCollectionValueAnalyzer @@ -17,7 +17,7 @@ author: mavasani | **Title** | Do not call ToImmutableCollection on an ImmutableCollection value | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2011.md b/docs/fundamentals/code-analysis/quality-rules/ca2011.md index 8ff609e11931a..15aeda8841596 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2011.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2011.md @@ -1,7 +1,7 @@ --- title: "CA2011: Do not assign property within its setter (code analysis)" description: "Learn about code analysis rule CA2011: Do not assign property within its setter" -ms.date: 04/29/2020 +ms.date: 11/12/2026 f1_keywords: - CA2011 helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Do not assign property within its setter | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2012.md b/docs/fundamentals/code-analysis/quality-rules/ca2012.md index e45446d567f3e..680cdf76e8cd8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2012.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2012.md @@ -1,7 +1,7 @@ --- title: "CA2012: Use ValueTasks correctly (code analysis)" description: "Learn about code analysis rule CA2012: Use ValueTasks correctly" -ms.date: 06/18/2020 +ms.date: 11/12/2026 f1_keywords: - "UseValueTasksCorrectly" - "CA2012" @@ -21,7 +21,7 @@ dev_langs: | **Title** | Use ValueTasks correctly | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2013.md b/docs/fundamentals/code-analysis/quality-rules/ca2013.md index 2d4a076f340db..4d681646c6418 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2013.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2013.md @@ -1,7 +1,7 @@ --- title: "CA2013: Do not use ReferenceEquals with value types (code analysis)" description: "Learn about code analysis rule ca2013: Do not use ReferenceEquals with value types" -ms.date: 05/27/2020 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseReferenceEqualsWithValueTypes" - "CA2013" @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Do not use ReferenceEquals with value types | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2014.md b/docs/fundamentals/code-analysis/quality-rules/ca2014.md index 7e27492014012..ffb3f8f4bd595 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2014.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2014.md @@ -1,7 +1,7 @@ --- title: "CA2014: Do not use stackalloc in loops (code analysis)" description: "Learn about code analysis rule CA2014: Do not use stackalloc in loops" -ms.date: 06/18/2020 +ms.date: 11/12/2026 f1_keywords: - "DoNotUseStackallocInLoops" - "CA2014" @@ -21,7 +21,7 @@ dev_langs: | **Title** | Do not use stackalloc in loops | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2015.md b/docs/fundamentals/code-analysis/quality-rules/ca2015.md index 1ee49996323d0..a1dab0d75130a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2015.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2015.md @@ -1,7 +1,7 @@ --- title: "CA2015: Do not define finalizers for types derived from MemoryManager<T> (code analysis)" description: "Learn about code analysis rule ca2015: Do not define finalizers for types derived from MemoryManager<T>" -ms.date: 05/18/2020 +ms.date: 11/12/2026 f1_keywords: - "DoNotDefineFinalizersForTypesDerivedFromMemoryManager" - "CA2015" @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Do not define finalizers for types derived from MemoryManager<T> | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2016.md b/docs/fundamentals/code-analysis/quality-rules/ca2016.md index fe09e5c390c2b..4cc14b26ac432 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2016.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2016.md @@ -1,7 +1,7 @@ --- title: "CA2016: Forward the CancellationToken parameter to methods that take one (code analysis)" description: "Learn about code analysis rule CA2016: Forward the CancellationToken parameter to methods that take one" -ms.date: 06/18/2020 +ms.date: 11/12/2026 f1_keywords: - "ForwardCancellationTokenToInvocations" - "CA2016" @@ -22,7 +22,7 @@ dev_langs: | **Title** | Forward the CancellationToken parameter to methods that take one | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2017.md b/docs/fundamentals/code-analysis/quality-rules/ca2017.md index 155b46de66921..e7d2e4bac0f40 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2017.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2017.md @@ -1,7 +1,7 @@ --- title: "CA2017: Parameter count mismatch (code analysis)" description: "Learn about code analysis rule CA2017: Parameter count mismatch" -ms.date: 09/24/2025 +ms.date: 11/12/2026 ai-usage: ai-assisted f1_keywords: - "LoggerMessageDefineAnalyzer" @@ -22,7 +22,7 @@ dev_langs: | **Title** | Parameter count mismatch | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2018.md b/docs/fundamentals/code-analysis/quality-rules/ca2018.md index f2ece667ba65e..96efbc981876c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2018.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2018.md @@ -1,7 +1,7 @@ --- title: "CA2018: The count argument to Buffer.BlockCopy should specify the number of bytes to copy" description: "Learn about code analysis rule CA2018: The count argument to Buffer.BlockCopy should specify the number of bytes to copy" -ms.date: 08/17/2021 +ms.date: 11/12/2026 f1_keywords: - "BufferBlockCopyLength" - "CA2018" @@ -18,7 +18,7 @@ author: mahdiva | **Title** | The `count` argument to `Buffer.BlockCopy` should specify the number of bytes to copy | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2019.md b/docs/fundamentals/code-analysis/quality-rules/ca2019.md index 3ce811084f071..165886204c6c8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2019.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2019.md @@ -1,7 +1,7 @@ --- title: "CA2019: 'ThreadStatic' fields should not use inline initialization" description: "Learn about code analysis rule CA2019: 'ThreadStatic' fields should not use inline initialization" -ms.date: 11/04/2022 +ms.date: 11/12/2026 f1_keywords: - CA2019 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | `ThreadStatic` fields should not use inline initialization | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2020.md b/docs/fundamentals/code-analysis/quality-rules/ca2020.md index 5aeef581ba2de..dfa3f568fea11 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2020.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2020.md @@ -1,7 +1,7 @@ --- title: "CA2020: Prevent behavioral change caused by built-in operators of IntPtr/UIntPtr" description: "Learn about code analysis rule CA2020 where some built-in operators behave differently than the previous user-defined operators." -ms.date: 10/07/2022 +ms.date: 11/12/2026 f1_keywords: - PreventNumericIntPtrUIntPtrBehavioralChanges - CA2020 @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Prevent behavioral change caused by built-in operators of IntPtr/UIntPtr | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2021.md b/docs/fundamentals/code-analysis/quality-rules/ca2021.md index 611bb4693ffbd..bb09707f6e9f5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2021.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2021.md @@ -1,7 +1,7 @@ --- title: "CA2021: Don't call Enumerable.Cast or Enumerable.OfType with incompatible types" description: "Learn about code analysis rule CA2021 - Don't call Enumerable.Cast or Enumerable.OfType with incompatible types" -ms.date: 11/16/2023 +ms.date: 11/12/2026 f1_keywords: - CA2021 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Don't call `Enumerable.Cast` or `Enumerable.OfType` with incompatible types | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2022.md b/docs/fundamentals/code-analysis/quality-rules/ca2022.md index 98907303f281e..d68c84d868c48 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2022.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2022.md @@ -1,7 +1,7 @@ --- title: "CA2022: Avoid inexact read with Stream.Read" description: "Learn about code analysis rule CA2022 - Avoid inexact read with Stream.Read" -ms.date: 10/26/2024 +ms.date: 11/12/2026 f1_keywords: - CA2022 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Avoid inexact read with Stream.Read | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2023.md b/docs/fundamentals/code-analysis/quality-rules/ca2023.md index 3162990f5f15e..209fa523b9ee4 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2023.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2023.md @@ -1,7 +1,7 @@ --- title: "CA2023: Invalid braces in message template (code analysis)" description: "Learn about code analysis rule CA2023: Invalid braces in message template" -ms.date: 10/27/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA2023 @@ -22,7 +22,7 @@ ai-usage: ai-generated | **Title** | Invalid braces in message template | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2024.md b/docs/fundamentals/code-analysis/quality-rules/ca2024.md index 0465a4e5b3b70..d428d8cbf645b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2024.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2024.md @@ -1,7 +1,7 @@ --- title: "CA2024: Do not use StreamReader.EndOfStream in async methods" description: "Learn about code analysis rule CA2024 - Do not use StreamReader.EndOfStream in async methods" -ms.date: 01/16/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA2024 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not use StreamReader.EndOfStream in async methods | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2025.md b/docs/fundamentals/code-analysis/quality-rules/ca2025.md index cee305f88765f..2660f27b38d4f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2025.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2025.md @@ -1,7 +1,7 @@ --- title: "CA2025: Do not pass 'IDisposable' instances into unawaited tasks" description: "Learn about code analysis rule CA2025 - Do not pass 'IDisposable' instances into unawaited tasks" -ms.date: 05/08/2025 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA2025 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Do not pass 'IDisposable' instances into unawaited tasks | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2026.md b/docs/fundamentals/code-analysis/quality-rules/ca2026.md index dcd96788152f9..e78b2007332d0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2026.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2026.md @@ -1,7 +1,7 @@ --- title: "CA2026: Prefer JsonElement.Parse over JsonDocument.Parse().RootElement" description: "Learn about code analysis rule CA2026 - Prefer JsonElement.Parse over JsonDocument.Parse().RootElement" -ms.date: 11/05/2025 +ms.date: 11/12/2026 f1_keywords: - CA2026 - PreferJsonElementParseOverJsonDocumentParse @@ -21,7 +21,7 @@ dev_langs: | **Title** | Prefer `JsonElement.Parse` over `JsonDocument.Parse().RootElement` | | **Category** | [Reliability](reliability-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2027.md b/docs/fundamentals/code-analysis/quality-rules/ca2027.md new file mode 100644 index 0000000000000..74b54c3b71cd7 --- /dev/null +++ b/docs/fundamentals/code-analysis/quality-rules/ca2027.md @@ -0,0 +1,103 @@ +--- +title: "CA2027: Cancel Task.Delay after Task.WhenAny completes (code analysis)" +description: "Learn about code analysis rule CA2027: Cancel Task.Delay after Task.WhenAny completes" +ms.date: 11/12/2026 +f1_keywords: + - CA2027 + - DoNotUseNonCancelableTaskDelayWithWhenAny +helpviewer_keywords: + - CA2027 +dev_langs: + - CSharp + - VB +ai-usage: ai-generated +--- + +# CA2027: Cancel Task.Delay after Task.WhenAny completes + +| Property | Value | +|-------------------------------------|-------| +| **Rule ID** | CA2027 | +| **Title** | Cancel `Task.Delay` after `Task.WhenAny` completes | +| **Category** | [Reliability](reliability-warnings.md) | +| **Fix is breaking or non-breaking** | Non-breaking | +| **Enabled by default in .NET 11** | As suggestion | +| **Applicable languages** | C# and Visual Basic | + +## Cause + +A call to includes a call that doesn't accept a . + +## Rule description + +When another task completes first, a noncancelable delay continues to run until its timeout expires. The unused timer consumes resources. + +## How to fix violations + +If you only need to wait for an operation with a timeout, use . It throws a if the operation doesn't complete before the timeout. + +If you need to call `Task.WhenAny`, pass a cancellation token to `Task.Delay` and cancel the token source when the other task completes. + +## Examples + +The following code shows a violation of CA2027: + +```csharp +Task winner = await Task.WhenAny(operation, Task.Delay(timeout)); +``` + +Use `Task.WaitAsync` when you only need a timeout: + +```csharp +await operation.WaitAsync(timeout); +``` + +Or cancel the delay after `Task.WhenAny` returns: + +```csharp +using var cts = new CancellationTokenSource(); +Task winner = await Task.WhenAny(operation, Task.Delay(timeout, cts.Token)); +cts.Cancel(); +``` + +The following Visual Basic code shows a violation: + +```vb +Dim winner = Await Task.WhenAny(operation, Task.Delay(timeout)) +``` + +Use `Task.WaitAsync` when you only need a timeout: + +```vb +Await operation.WaitAsync(timeout) +``` + +## When to suppress warnings + +Suppress the warning only when the delay should continue after another task completes. + +## Suppress a warning + +To suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule. + +```csharp +#pragma warning disable CA2027 +// The code that's violating the rule is on this line. +#pragma warning restore CA2027 +``` + +To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../configuration-files.md). + +```ini +[*.{cs,vb}] +dotnet_diagnostic.CA2027.severity = none +``` + +For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). + +## See also + +- [Reliability rules](reliability-warnings.md) +- +- +- diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2028.md b/docs/fundamentals/code-analysis/quality-rules/ca2028.md new file mode 100644 index 0000000000000..2bb64f50debcb --- /dev/null +++ b/docs/fundamentals/code-analysis/quality-rules/ca2028.md @@ -0,0 +1,96 @@ +--- +title: "CA2028: Avoid redundant 'Regex.IsMatch' call before 'Regex.Match' (code analysis)" +description: "Learn about code analysis rule CA2028: Avoid redundant 'Regex.IsMatch' call before 'Regex.Match'" +ms.date: 11/12/2026 +f1_keywords: + - CA2028 + - AvoidRedundantRegexIsMatchBeforeMatch +helpviewer_keywords: + - CA2028 +dev_langs: + - CSharp + - VB +ai-usage: ai-generated +--- + +# CA2028: Avoid redundant 'Regex.IsMatch' call before 'Regex.Match' + +| Property | Value | +|-------------------------------------|-------| +| **Rule ID** | CA2028 | +| **Title** | Avoid redundant `Regex.IsMatch` call before `Regex.Match` | +| **Category** | [Reliability](reliability-warnings.md) | +| **Fix is breaking or non-breaking** | Non-breaking | +| **Enabled by default in .NET 11** | As suggestion | +| **Applicable languages** | C# and Visual Basic | + +## Cause + +Code calls and then calls with the same input and pattern. + +## Rule description + +`Regex.IsMatch` and `Regex.Match` both evaluate the regular expression. Call `Regex.Match` once and check the returned property to avoid the redundant evaluation. + +## How to fix violations + +Replace the `Regex.IsMatch` call with one `Regex.Match` call. Use `Match.Success` to check whether the input matches the pattern. + +## Examples + +The following code shows a violation of CA2028: + +```csharp +if (Regex.IsMatch(input, pattern)) + return Regex.Match(input, pattern).Value; +``` + +Call `Regex.Match` once: + +```csharp +var match = Regex.Match(input, pattern); +return match.Success ? match.Value : string.Empty; +``` + +The following Visual Basic code shows a violation: + +```vb +If Regex.IsMatch(input, pattern) Then + Return Regex.Match(input, pattern).Value +End If +``` + +Call `Regex.Match` once: + +```vb +Dim match = Regex.Match(input, pattern) +Return If(match.Success, match.Value, String.Empty) +``` + +## When to suppress warnings + +Suppress the warning only when you intentionally evaluate the same regular expression more than once. + +## Suppress a warning + +To suppress a single violation, add preprocessor directives to your source file to disable and then re-enable the rule. + +```csharp +#pragma warning disable CA2028 +// The code that's violating the rule is on this line. +#pragma warning restore CA2028 +``` + +To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../configuration-files.md). + +```ini +[*.{cs,vb}] +dotnet_diagnostic.CA2028.severity = none +``` + +For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). + +## See also + +- [Reliability rules](reliability-warnings.md) +- [CA1874: Use `Regex.IsMatch`](ca1874.md) diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2100.md b/docs/fundamentals/code-analysis/quality-rules/ca2100.md index bf909ee61f863..292cfd3ca93fe 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2100.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2100.md @@ -1,7 +1,7 @@ --- title: "CA2100: Review SQL queries for security vulnerabilities (code analysis)" description: "Learn about code analysis rule CA2100: Review SQL queries for security vulnerabilities" -ms.date: 09/24/2025 +ms.date: 11/12/2026 f1_keywords: - Review SQL queries for security vulnerabilities - ReviewSqlQueriesForSecurityVulnerabilities @@ -21,7 +21,7 @@ dev_langs: | **Title** | Review SQL queries for security vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2101.md b/docs/fundamentals/code-analysis/quality-rules/ca2101.md index add5e1cec42d9..9d3976c6f2d63 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2101.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2101.md @@ -1,7 +1,7 @@ --- title: "CA2101: Specify marshalling for P-Invoke string arguments (code analysis)" description: "Learn about code analysis rule CA2101: Specify marshalling for P-Invoke string arguments" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - SpecifyMarshalingForPInvokeStringArguments - CA2101 @@ -20,7 +20,7 @@ dev_langs: | **Title** | Specify marshalling for P/Invoke string arguments | | **Category** | [Globalization](globalization-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2109.md b/docs/fundamentals/code-analysis/quality-rules/ca2109.md index 4f2858eec59df..be7fdb45c8477 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2109.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2109.md @@ -1,7 +1,7 @@ --- title: "CA2109: Review visible event handlers (code analysis)" description: "Learn about code analysis rule CA2109: Review visible event handlers" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA2109 - ReviewVisibleEventHandlers @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Review visible event handlers | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2119.md b/docs/fundamentals/code-analysis/quality-rules/ca2119.md index a33da5017c9b5..d7dfeb138c444 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2119.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2119.md @@ -1,7 +1,7 @@ --- title: "CA2119: Seal methods that satisfy private interfaces (code analysis)" description: "Learn about code analysis rule CA2119: Seal methods that satisfy private interfaces" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - SealMethodsThatSatisfyPrivateInterfaces - CA2119 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Seal methods that satisfy private interfaces | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2153.md b/docs/fundamentals/code-analysis/quality-rules/ca2153.md index 3562a618b60e8..1e8831122a25b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2153.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2153.md @@ -1,7 +1,7 @@ --- title: Code analysis rule CA2153 for Corrupted State Exceptions (code analysis) description: "Learn about code analysis rule Code analysis rule CA2153 for Corrupted State Exceptions" -ms.date: 02/19/2019 +ms.date: 11/12/2026 author: gewarren ms.author: gewarren f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Avoid handling Corrupted State Exceptions | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2200.md b/docs/fundamentals/code-analysis/quality-rules/ca2200.md index 86148559239c3..3c64acf9138bc 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2200.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2200.md @@ -1,7 +1,7 @@ --- title: "CA2200: Rethrow to preserve stack details (code analysis)" description: "Learn about code analysis rule CA2200: Rethrow to preserve stack details" -ms.date: 02/15/2023 +ms.date: 11/12/2026 f1_keywords: - RethrowToPreserveStackDetails - CA2200 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Rethrow to preserve stack details | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2201.md b/docs/fundamentals/code-analysis/quality-rules/ca2201.md index c8846645b0b35..45045823deb3a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2201.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2201.md @@ -1,7 +1,7 @@ --- title: "CA2201: Do not raise reserved exception types (code analysis)" description: "Learn about code analysis rule CA2201: Do not raise reserved exception types" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - DoNotRaiseReservedExceptionTypes - CA2201 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Do not raise reserved exception types | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2207.md b/docs/fundamentals/code-analysis/quality-rules/ca2207.md index 4f0334f5f6fe6..e6255f9c22ebc 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2207.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2207.md @@ -1,7 +1,7 @@ --- title: "CA2207: Initialize value type static fields inline (code analysis)" description: "Learn about code analysis rule CA2207: Initialize value type static fields inline" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - "InitializeValueTypeStaticFieldsInline" - "CA2207" @@ -21,7 +21,7 @@ dev_langs: | **Title** | Initialize value type static fields inline | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2208.md b/docs/fundamentals/code-analysis/quality-rules/ca2208.md index 20aaf4c38cae5..c877ea4e1d9e6 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2208.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2208.md @@ -1,7 +1,7 @@ --- title: "CA2208: Instantiate argument exceptions correctly (code analysis)" description: "Learn about code analysis rule CA2208: Instantiate argument exceptions correctly" -ms.date: 10/24/2025 +ms.date: 11/12/2026 f1_keywords: - CA2208 - InstantiateArgumentExceptionsCorrectly @@ -22,7 +22,7 @@ dev_langs: | **Title** | Instantiate argument exceptions correctly | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2211.md b/docs/fundamentals/code-analysis/quality-rules/ca2211.md index ae90b8f538aee..64a346a77a3b7 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2211.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2211.md @@ -1,7 +1,7 @@ --- title: "CA2211: Non-constant fields should not be visible (code analysis)" description: "Learn about code analysis rule CA2211: Non-constant fields should not be visible" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA2211 - NonConstantFieldsShouldNotBeVisible @@ -22,7 +22,7 @@ dev_langs: | **Title** | Non-constant fields should not be visible | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2213.md b/docs/fundamentals/code-analysis/quality-rules/ca2213.md index d55a62c0d078f..cc02585f579dd 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2213.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2213.md @@ -1,7 +1,7 @@ --- title: "CA2213: Disposable fields should be disposed (code analysis)" description: "Learn about code analysis rule CA2213: Disposable fields should be disposed" -ms.date: 05/14/2019 +ms.date: 11/12/2026 f1_keywords: - DisposableFieldsShouldBeDisposed - CA2213 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Disposable fields should be disposed | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2214.md b/docs/fundamentals/code-analysis/quality-rules/ca2214.md index 962d33230fd29..82b23a16f313e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2214.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2214.md @@ -1,7 +1,7 @@ --- title: "CA2214: Do not call overridable methods in constructors (code analysis)" description: "Learn about code analysis rule CA2214: Do not call overridable methods in constructors" -ms.date: 05/29/2016 +ms.date: 11/12/2026 f1_keywords: - DoNotCallOverridableMethodsInConstructors - CA2214 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Do not call overridable methods in constructors | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2215.md b/docs/fundamentals/code-analysis/quality-rules/ca2215.md index 5faf9c8fd7663..c45ccba9e0d6e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2215.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2215.md @@ -1,7 +1,7 @@ --- title: "CA2215: Dispose methods should call base class dispose (code analysis)" description: "Learn about code analysis rule CA2215: Dispose methods should call base class dispose" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA2215 - DisposeMethodsShouldCallBaseClassDispose @@ -23,7 +23,7 @@ dev_langs: | **Title** | Dispose methods should call base class dispose | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2216.md b/docs/fundamentals/code-analysis/quality-rules/ca2216.md index 39ca2e5b97070..10b5ae40751e8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2216.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2216.md @@ -1,7 +1,7 @@ --- title: "CA2216: Disposable types should declare finalizer (code analysis)" description: "Learn about code analysis rule CA2216: Disposable types should declare finalizer" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - DisposableTypesShouldDeclareFinalizer - CA2216 @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Disposable types should declare finalizer | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2217.md b/docs/fundamentals/code-analysis/quality-rules/ca2217.md index 06bde2378f0ab..debf3440110fd 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2217.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2217.md @@ -1,7 +1,7 @@ --- title: "CA2217: Do not mark enums with FlagsAttribute (code analysis)" description: "Learn about code analysis rule CA2217: Do not mark enums with FlagsAttribute" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - DoNotMarkEnumsWithFlags - CA2217 @@ -22,7 +22,7 @@ ms.author: gewarren | **Title** | Do not mark enums with FlagsAttribute | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2218.md b/docs/fundamentals/code-analysis/quality-rules/ca2218.md index d1cb5a5df4afc..a808c94a8b62b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2218.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2218.md @@ -1,7 +1,7 @@ --- title: "CA2218: Override GetHashCode on overriding Equals" description: "Learn about code analysis rule CA2218: Override GetHashCode on overriding Equals" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA2218 - OverrideGetHashCodeOnOverridingEquals @@ -19,7 +19,7 @@ dev_langs: | **Title** | Override GetHashCode on overriding Equals | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2219.md b/docs/fundamentals/code-analysis/quality-rules/ca2219.md index 6ae7d81aa945e..0f234c9450141 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2219.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2219.md @@ -1,7 +1,7 @@ --- title: "CA2219: Do not raise exceptions in exception clauses (code analysis)" description: "Learn about code analysis rule CA2219: Do not raise exceptions in exception clauses" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - DoNotRaiseExceptionsInExceptionClauses - CA2219 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Do not raise exceptions in exception clauses | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking, Breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2224.md b/docs/fundamentals/code-analysis/quality-rules/ca2224.md index c5d91cffb2b98..4ee08d5de5bf8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2224.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2224.md @@ -1,7 +1,7 @@ --- title: "CA2224: Override Equals() on overloading operator equals" description: "Learn about code analysis rule CA2224: Override Equals() on overloading operator equals" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - "CA2224" - "OverrideEqualsOnOverloadingOperatorEquals" @@ -18,7 +18,7 @@ helpviewer_keywords: | **Title** | Override Equals on overloading operator equals | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2225.md b/docs/fundamentals/code-analysis/quality-rules/ca2225.md index 67c23364f616f..0bcd6621a310b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2225.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2225.md @@ -1,7 +1,7 @@ --- title: "CA2225: Operator overloads have named alternates (code analysis)" description: "Learn about code analysis rule CA2225: Operator overloads have named alternates" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - OperatorOverloadsHaveNamedAlternates - CA2225 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Operator overloads have named alternates | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2226.md b/docs/fundamentals/code-analysis/quality-rules/ca2226.md index fd6c7aaabd0f6..270f807d191d3 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2226.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2226.md @@ -1,7 +1,7 @@ --- title: "CA2226: Operators should have symmetrical overloads (code analysis)" description: "Learn about code analysis rule CA2226: Operators should have symmetrical overloads" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - "OperatorsShouldHaveSymmetricalOverloads" - "CA2226" @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Operators should have symmetrical overloads | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2227.md b/docs/fundamentals/code-analysis/quality-rules/ca2227.md index 45894c48f494d..106a28797e4fc 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2227.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2227.md @@ -1,7 +1,7 @@ --- title: "CA2227: Collection properties should be read only (code analysis)" description: "Learn about code analysis rule CA2227: Collection properties should be read only" -ms.date: 03/30/2026 +ms.date: 11/12/2026 f1_keywords: - CA2227 - CollectionPropertiesShouldBeReadOnly @@ -23,7 +23,7 @@ dev_langs: | **Title** | Collection properties should be read only | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2229.md b/docs/fundamentals/code-analysis/quality-rules/ca2229.md index 8d9470c257c5e..bc26f076e5b2c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2229.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2229.md @@ -1,7 +1,7 @@ --- title: "CA2229: Implement serialization constructors (code analysis)" description: "Learn about code analysis rule CA2229: Implement serialization constructors" -ms.date: 11/13/2023 +ms.date: 11/12/2026 f1_keywords: - CA2229 - ImplementSerializationConstructors @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Implement serialization constructors | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | > [!NOTE] diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2231.md b/docs/fundamentals/code-analysis/quality-rules/ca2231.md index 68bac49dd29b0..978a4f2be09a1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2231.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2231.md @@ -1,7 +1,7 @@ --- title: "CA2231: Overload operator equals on overriding ValueType.Equals (code analysis)" description: "Learn about code analysis rule CA2231: Overload operator equals on overriding ValueType.Equals" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - OverloadOperatorEqualsOnOverridingValueTypeEquals - CA2231 @@ -23,7 +23,7 @@ dev_langs: | **Title** | Overload operator equals on overriding ValueType.Equals | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2234.md b/docs/fundamentals/code-analysis/quality-rules/ca2234.md index 135da149d51a4..d6edda57bdcec 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2234.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2234.md @@ -1,7 +1,7 @@ --- title: "CA2234: Pass System.Uri objects instead of strings (code analysis)" description: "Learn about code analysis rule CA2234: Pass System.Uri objects instead of strings" -ms.date: 03/11/2019 +ms.date: 11/12/2026 f1_keywords: - PassSystemUriObjectsInsteadOfStrings - CA2234 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Pass System.Uri objects instead of strings | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2235.md b/docs/fundamentals/code-analysis/quality-rules/ca2235.md index 437b098ab2949..3c291b3451983 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2235.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2235.md @@ -1,7 +1,7 @@ --- title: "CA2235: Mark all non-serializable fields (code analysis)" description: "Learn about code analysis rule CA2235: Mark all non-serializable fields" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA2235 - MarkAllNonSerializableFields @@ -22,7 +22,7 @@ dev_langs: | **Title** | Mark all non-serializable fields | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2237.md b/docs/fundamentals/code-analysis/quality-rules/ca2237.md index cd5a34b29a12a..d75a50394902b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2237.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2237.md @@ -1,7 +1,7 @@ --- title: "CA2237: Mark ISerializable types with SerializableAttribute (code analysis)" description: "Learn about code analysis rule CA2237: Mark ISerializable types with SerializableAttribute" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA2237 - MarkISerializableTypesWithSerializable @@ -22,7 +22,7 @@ dev_langs: | **Title** | Mark ISerializable types with SerializableAttribute | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2241.md b/docs/fundamentals/code-analysis/quality-rules/ca2241.md index ee4329b8ea372..2bf97066ae2bb 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2241.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2241.md @@ -1,7 +1,7 @@ --- title: "CA2241: Provide correct arguments to formatting methods (code analysis)" description: "Learn about code analysis rule CA2241: Provide correct arguments to formatting methods" -ms.date: 05/28/2020 +ms.date: 11/12/2026 f1_keywords: - CA2241 - Provide correct arguments to formatting methods @@ -23,7 +23,7 @@ dev_langs: | **Title** | Provide correct arguments to formatting methods | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2242.md b/docs/fundamentals/code-analysis/quality-rules/ca2242.md index f939936d50932..b149e51eece23 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2242.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2242.md @@ -1,7 +1,7 @@ --- title: "CA2242: Test for NaN correctly (code analysis)" description: "Learn about code analysis rule CA2242: Test for NaN correctly" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - TestForNaNCorrectly - CA2242 @@ -21,7 +21,7 @@ dev_langs: | **Title** | Test for NaN correctly | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2243.md b/docs/fundamentals/code-analysis/quality-rules/ca2243.md index d683795278dee..8f49a5cc7c59c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2243.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2243.md @@ -1,7 +1,7 @@ --- title: "CA2243: Attribute string literals should parse correctly (code analysis)" description: "Learn about code analysis rule CA2243: Attribute string literals should parse correctly" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA2243 - AttributeStringLiteralsShouldParseCorrectly @@ -19,7 +19,7 @@ ms.author: gewarren | **Title** | Attribute string literals should parse correctly | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2244.md b/docs/fundamentals/code-analysis/quality-rules/ca2244.md index 0a565b3a6c0dc..ab2e8d2525fec 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2244.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2244.md @@ -1,7 +1,7 @@ --- title: "CA2244: Do not duplicate indexed element initializations (code analysis)" description: "Learn about code analysis rule CA2244: Do not duplicate indexed element initializations" -ms.date: 04/30/2020 +ms.date: 11/12/2026 f1_keywords: - CA2244 helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Do not duplicate indexed element initializations | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2245.md b/docs/fundamentals/code-analysis/quality-rules/ca2245.md index de183d5917608..bb5ab18bbd4ef 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2245.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2245.md @@ -1,7 +1,7 @@ --- title: "CA2245: Do not assign a property to itself (code analysis)" description: "Learn about code analysis rule CA2245: Do not assign a property to itself" -ms.date: 04/29/2020 +ms.date: 11/12/2026 f1_keywords: - CA2245 helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Do not assign a property to itself | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2246.md b/docs/fundamentals/code-analysis/quality-rules/ca2246.md index 9f5dc562efb51..48d14e83d78ad 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2246.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2246.md @@ -1,7 +1,7 @@ --- title: "CA2246: Do not assign a symbol and its member in the same statement (code analysis)" description: "Learn about code analysis rule CA2246: Do not assign a symbol and its member in the same statement" -ms.date: 04/30/2020 +ms.date: 11/12/2026 f1_keywords: - CA2246 helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Do not assign a symbol and its member in the same statement | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2247.md b/docs/fundamentals/code-analysis/quality-rules/ca2247.md index 118943cc35c62..3c75112ebd96b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2247.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2247.md @@ -1,7 +1,7 @@ --- title: "CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum (code analysis)" description: "Learn about code analysis rule CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum" -ms.date: 05/16/2020 +ms.date: 11/12/2026 f1_keywords: - "DoNotCreateTaskCompletionSourceWithWrongArguments" - "CA2247" @@ -19,7 +19,7 @@ ms.author: stoub | **Title** | Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2248.md b/docs/fundamentals/code-analysis/quality-rules/ca2248.md index 33dbbca3e1e54..d989fb2ca498d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2248.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2248.md @@ -1,7 +1,7 @@ --- title: "CA2248: Provide correct enum argument to Enum.HasFlag (code analysis)" description: "Learn about code analysis rule CA2248: Provide correct enum argument to Enum.HasFlag" -ms.date: 05/06/2020 +ms.date: 11/12/2026 f1_keywords: - CA2248 helpviewer_keywords: @@ -16,7 +16,7 @@ author: mavasani | **Title** | Provide correct enum argument to Enum.HasFlag | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2249.md b/docs/fundamentals/code-analysis/quality-rules/ca2249.md index 1b9edfc77913b..2c2abff7d143f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2249.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2249.md @@ -1,7 +1,7 @@ --- title: "CA2249: Consider using 'String.Contains' instead of 'String.IndexOf' (code analysis)" description: "Learn about code analysis rule CA2249: Consider using 'String.Contains' instead of 'String.IndexOf'" -ms.date: 08/27/2020 +ms.date: 11/12/2026 f1_keywords: - CA2249 helpviewer_keywords: @@ -16,7 +16,7 @@ author: pgovind | **Title** | Consider using String.Contains instead of String.IndexOf | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2250.md b/docs/fundamentals/code-analysis/quality-rules/ca2250.md index 75ffbbba59c42..1270eb0b1269d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2250.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2250.md @@ -1,7 +1,7 @@ --- title: "CA2250: Use ThrowIfCancellationRequested" description: "Learn about code analysis rule CA2250: Use ThrowIfCancellationRequested" -ms.date: 05/21/2021 +ms.date: 11/12/2026 f1_keywords: - CA2250 - UseCancellationTokenThrowIfCancellationRequested @@ -21,7 +21,7 @@ dev_langs: | **Title** | Use `ThrowIfCancellationRequested` | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2251.md b/docs/fundamentals/code-analysis/quality-rules/ca2251.md index 0d0f7e7c385a0..774693889ccab 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2251.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2251.md @@ -1,7 +1,7 @@ --- title: "CA2251: Use String.Equals over String.Compare" description: "Learn about code analysis rule CA2251: Use String.Equals over String.Compare" -ms.date: 05/31/2021 +ms.date: 11/12/2026 f1_keywords: - CA2251 - UseStringEqualsOverStringCompare @@ -18,7 +18,7 @@ author: NewellClark | **Title** | Use `String.Equals` over `String.Compare` | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2252.md b/docs/fundamentals/code-analysis/quality-rules/ca2252.md index 336b5f7583534..68d7ec32609da 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2252.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2252.md @@ -1,7 +1,7 @@ --- title: "CA2252: Opt in to preview features" description: "Learn about the code analyzer that scans for preview API usage and produces a build error if an assembly has not opted in to preview features." -ms.date: 11/09/2022 +ms.date: 11/12/2026 f1_keywords: - CA2252 - DetectPreviewFeaturesAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | Opt in to preview features before using them | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As error | +| **Enabled by default in .NET 11** | As error | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2253.md b/docs/fundamentals/code-analysis/quality-rules/ca2253.md index a41e5920381d2..206371a1b171f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2253.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2253.md @@ -1,7 +1,7 @@ --- title: "CA2253: Named placeholders should not be numeric values" description: "Learn about code analysis rule CA2253: Named placeholders should not be numeric values" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - CA2253 - LoggerMessageDefineAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | Named placeholders should not be numeric values | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2254.md b/docs/fundamentals/code-analysis/quality-rules/ca2254.md index 1730b69cd9a3d..5257eca759cee 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2254.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2254.md @@ -1,7 +1,7 @@ --- title: "CA2254: Template should be a static expression" description: "Learn about code analysis rule CA2254: Template should be a static expression" -ms.date: 11/30/2022 +ms.date: 11/12/2026 f1_keywords: - CA2254 - LoggerMessageDefineAnalyzer @@ -18,7 +18,7 @@ author: Youssef1313 | **Title** | Template should be a static expression | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2255.md b/docs/fundamentals/code-analysis/quality-rules/ca2255.md index 990892d01c348..025ea6d089587 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2255.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2255.md @@ -1,7 +1,7 @@ --- title: "CA2255: The 'ModuleInitializer' attribute should not be used in libraries" description: "Learn about code analysis rule CA2255: The 'ModuleInitializer' attribute should not be used in libraries" -ms.date: 11/15/2021 +ms.date: 11/12/2026 f1_keywords: - CA2255 - ModuleInitializerAttributeShouldNotBeUsedInLibraries @@ -18,7 +18,7 @@ author: jeffhandley | **Title** | The `ModuleInitializer` attribute should not be used in libraries | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2256.md b/docs/fundamentals/code-analysis/quality-rules/ca2256.md index 31913826e0a39..74494da5d8c3e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2256.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2256.md @@ -1,7 +1,7 @@ --- title: "CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface" description: "Learn about code analysis rule CA2256: All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - CA2256 - DynamicInterfaceCastableImplementationAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2257.md b/docs/fundamentals/code-analysis/quality-rules/ca2257.md index e83e93afeca02..2873389c90a77 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2257.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2257.md @@ -1,7 +1,7 @@ --- title: "CA2257: Members defined on an interface with 'DynamicInterfaceCastableImplementationAttribute' should be 'static'" description: "Learn about code analysis rule CA2257: Members defined on an interface with 'DynamicInterfaceCastableImplementationAttribute' should be 'static'" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - CA2257 - DynamicInterfaceCastableImplementationAnalyzer @@ -20,7 +20,7 @@ dev_langs: | **Title** | Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static' | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2258.md b/docs/fundamentals/code-analysis/quality-rules/ca2258.md index 33ffd245cff3b..ecb338e9556ac 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2258.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2258.md @@ -1,7 +1,7 @@ --- title: "CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported" description: "Learn about code analysis rule CA2258: Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported" -ms.date: 01/19/2022 +ms.date: 11/12/2026 f1_keywords: - CA2258 - DynamicInterfaceCastableImplementationAnalyzer @@ -18,7 +18,7 @@ author: Youssef1313 | **Title** | Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2259.md b/docs/fundamentals/code-analysis/quality-rules/ca2259.md index 5dd8a2e788259..a85afaefc6fac 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2259.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2259.md @@ -1,7 +1,7 @@ --- title: "CA2259: Ensure 'ThreadStatic' is only used with static fields" description: "Learn about code analysis rule CA2259: Ensure 'ThreadStatic' is only used with static fields" -ms.date: 11/04/2022 +ms.date: 11/12/2026 f1_keywords: - CA2259 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Ensure `ThreadStatic` is only used with static fields | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2260.md b/docs/fundamentals/code-analysis/quality-rules/ca2260.md index ec2eb12237361..6fd35e4c7fd69 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2260.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2260.md @@ -1,7 +1,7 @@ --- title: "CA2260: Implement generic math interfaces correctly" description: "Learn about code analysis rule CA2260 - Generic math interfaces require the derived type itself to be used for the self recurring type parameter." -ms.date: 10/06/2022 +ms.date: 11/12/2026 f1_keywords: - CA2260 - ImplementGenericMathInterfacesCorrectly @@ -18,7 +18,7 @@ author: buyaa-n | **Title** | Implement generic math interfaces correctly | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2261.md b/docs/fundamentals/code-analysis/quality-rules/ca2261.md index 03ff9cc8ae2ed..1fd4d5d71c554 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2261.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2261.md @@ -1,7 +1,7 @@ --- title: "CA2261: Do not use `ConfigureAwaitOptions.SuppressThrowing` with `Task`" description: "Learn about code analysis rule CA2261 - Do not use `ConfigureAwaitOptions.SuppressThrowing` with `Task`" -ms.date: 11/16/2023 +ms.date: 11/12/2026 f1_keywords: - CA2261 helpviewer_keywords: @@ -15,7 +15,7 @@ helpviewer_keywords: | **Title** | Do not use `ConfigureAwaitOptions.SuppressThrowing` with `Task` | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2262.md b/docs/fundamentals/code-analysis/quality-rules/ca2262.md index f581e26f8aef4..8c2d0708045b9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2262.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2262.md @@ -1,7 +1,7 @@ --- title: "CA2262: Set 'MaxResponseHeadersLength' properly" description: "Learn about code analysis rule CA2262 - Set 'MaxResponseHeadersLength' properly" -ms.date: 01/30/2024 +ms.date: 11/12/2026 f1_keywords: - CA2262 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Set `MaxResponseHeadersLength` properly | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2263.md b/docs/fundamentals/code-analysis/quality-rules/ca2263.md index fd97b472f6b29..61c2023384a27 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2263.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2263.md @@ -1,7 +1,7 @@ --- title: "CA2263: Prefer generic overload when type is known (code analysis)" description: "Learn about code analyzer rule CA2263 - Prefer generic overload when type is known" -ms.date: 02/18/2024 +ms.date: 11/12/2026 ms.topic: reference f1_keywords: - CA2263 @@ -22,7 +22,7 @@ dev_langs: | **Title** | Prefer generic overload when type is known | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As suggestion | +| **Enabled by default in .NET 11** | As suggestion | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2264.md b/docs/fundamentals/code-analysis/quality-rules/ca2264.md index d2267b8ea43a8..8fa76f5a26304 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2264.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2264.md @@ -1,7 +1,7 @@ --- title: "CA2264: Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'" description: "Learn about code analysis rule CA2264 - Do not pass a non-nullable value to 'ArgumentNullException.ThrowIfNull'" -ms.date: 02/25/2024 +ms.date: 11/12/2026 f1_keywords: - CA2264 helpviewer_keywords: @@ -18,7 +18,7 @@ dev_langs: | **Title** | Do not pass a non-nullable value to `ArgumentNullException.ThrowIfNull` | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2265.md b/docs/fundamentals/code-analysis/quality-rules/ca2265.md index a86b8e9d49936..e6a1d32747691 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2265.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2265.md @@ -1,7 +1,7 @@ --- title: "CA2265: Do not compare Span to 'null' or 'default'" description: "Learn about code analysis rule CA2265 - Do not compare Span to 'null' or 'default'" -ms.date: 10/28/2024 +ms.date: 11/12/2026 f1_keywords: - CA2265 helpviewer_keywords: @@ -17,7 +17,7 @@ dev_langs: | **Title** | Do not compare `Span` to `null` or `default` | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2266.md b/docs/fundamentals/code-analysis/quality-rules/ca2266.md index 277e8ffa24029..470dfa5f2df2e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2266.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2266.md @@ -1,7 +1,7 @@ --- title: "CA2266: File-based program entry point should start with '#!'" description: "Learn about code analysis rule CA2266 - File-based program entry point should start with '#!'" -ms.date: 06/02/2026 +ms.date: 11/12/2026 f1_keywords: - CA2266 helpviewer_keywords: @@ -19,7 +19,7 @@ ai-usage: ai-assisted | **Title** | File-based program entry point should start with `#!` | | **Category** | [Usage](usage-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | As warning | +| **Enabled by default in .NET 11** | As warning | | **Applicable languages** | C# | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2300.md b/docs/fundamentals/code-analysis/quality-rules/ca2300.md index d66754dd26388..fd842e788f5e9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2300.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2300.md @@ -1,7 +1,7 @@ --- title: "CA2300: Do not use insecure deserializer BinaryFormatter (code analysis)" description: "Learn about code analysis rule CA2300: Do not use insecure deserializer BinaryFormatter" -ms.date: 07/15/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not use insecure deserializer BinaryFormatter | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2301.md b/docs/fundamentals/code-analysis/quality-rules/ca2301.md index a3f90df27f32d..934181c4ad8ff 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2301.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2301.md @@ -1,7 +1,7 @@ --- title: "CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder (code analysis)" description: "Learn about code analysis rule CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder" -ms.date: 07/15/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2302.md b/docs/fundamentals/code-analysis/quality-rules/ca2302.md index 526cb43442ab2..da5d77a7a04a2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2302.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2302.md @@ -1,7 +1,7 @@ --- title: "CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize (code analysis)" description: "Learn about code analysis rule CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize" -ms.date: 07/15/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2305.md b/docs/fundamentals/code-analysis/quality-rules/ca2305.md index 10bed360a5360..c1910573c4de9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2305.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2305.md @@ -1,7 +1,7 @@ --- title: "CA2305: Do not use insecure deserializer LosFormatter (code analysis)" description: "Learn about code analysis rule CA2305: Do not use insecure deserializer LosFormatter" -ms.date: 05/01/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not use insecure deserializer LosFormatter | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2310.md b/docs/fundamentals/code-analysis/quality-rules/ca2310.md index 87c6dcb9dbaf8..70cbeb88aa145 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2310.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2310.md @@ -1,7 +1,7 @@ --- title: "CA2310: Do not use insecure deserializer NetDataContractSerializer (code analysis)" description: "Learn about code analysis rule CA2310: Do not use insecure deserializer NetDataContractSerializer" -ms.date: 05/01/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not use insecure deserializer NetDataContractSerializer | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2311.md b/docs/fundamentals/code-analysis/quality-rules/ca2311.md index 1294941100cbd..8870dc14d0496 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2311.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2311.md @@ -1,7 +1,7 @@ --- title: "CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder (code analysis)" description: "Learn about code analysis rule CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder" -ms.date: 05/01/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not deserialize without first setting NetDataContractSerializer.Binder | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2312.md b/docs/fundamentals/code-analysis/quality-rules/ca2312.md index 28bd988e9f711..7ba4c3129fc0d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2312.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2312.md @@ -1,7 +1,7 @@ --- title: "CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing (code analysis)" description: "Learn about code analysis rule CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing" -ms.date: 05/01/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Ensure NetDataContractSerializer.Binder is set before deserializing | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2315.md b/docs/fundamentals/code-analysis/quality-rules/ca2315.md index ed18f96f62382..095363da01ee3 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2315.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2315.md @@ -1,7 +1,7 @@ --- title: "CA2315: Do not use insecure deserializer ObjectStateFormatter (code analysis)" description: "Learn about code analysis rule CA2315: Do not use insecure deserializer ObjectStateFormatter" -ms.date: 05/01/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not use insecure deserializer ObjectStateFormatter | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2321.md b/docs/fundamentals/code-analysis/quality-rules/ca2321.md index 7c80f23f9c2c2..cca34d8ae5751 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2321.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2321.md @@ -1,7 +1,7 @@ --- title: "CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver (code analysis)" description: "Learn about code analysis rule CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver" -ms.date: 05/08/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2322.md b/docs/fundamentals/code-analysis/quality-rules/ca2322.md index 7d6705049fdef..933d4af0fd7e2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2322.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2322.md @@ -1,7 +1,7 @@ --- title: "CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing (code analysis)" description: "Learn about code analysis rule CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing" -ms.date: 05/08/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2326.md b/docs/fundamentals/code-analysis/quality-rules/ca2326.md index 0383c7cb46909..80737c11f794c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2326.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2326.md @@ -1,7 +1,7 @@ --- title: "CA2326: Do not use TypeNameHandling values other than None (code analysis)" description: Provides information about code analysis rule CA2326, including causes, how to fix violations, and when to suppress it. -ms.date: 08/20/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Do not use TypeNameHandling values other than None | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2327.md b/docs/fundamentals/code-analysis/quality-rules/ca2327.md index c6f673961d973..11c993cd1644f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2327.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2327.md @@ -1,7 +1,7 @@ --- title: "CA2327: Do not use insecure JsonSerializerSettings (code analysis)" description: Provides information about code analysis rule CA2327, including causes, how to fix violations, and when to suppress it. -ms.date: 08/20/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Do not use insecure JsonSerializerSettings | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2328.md b/docs/fundamentals/code-analysis/quality-rules/ca2328.md index 3e5b37b1bfc8a..9d7892c7f50af 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2328.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2328.md @@ -1,7 +1,7 @@ --- title: "CA2328: Ensure that JsonSerializerSettings are secure (code analysis)" description: Provides information about code analysis rule CA2328, including causes, how to fix violations, and when to suppress it. -ms.date: 08/20/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Ensure that JsonSerializerSettings are secure | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2329.md b/docs/fundamentals/code-analysis/quality-rules/ca2329.md index e18285118fa8b..abc92abb2903a 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2329.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2329.md @@ -1,7 +1,7 @@ --- title: "CA2329: Do not deserialize with JsonSerializer using an insecure configuration (code analysis)" description: Provides information about code analysis rule CA2329, including causes, how to fix violations, and when to suppress it. -ms.date: 08/20/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Do not deserialize with JsonSerializer using an insecure configuration | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2330.md b/docs/fundamentals/code-analysis/quality-rules/ca2330.md index 9f8442fae53e6..01e444140a91c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2330.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2330.md @@ -1,7 +1,7 @@ --- title: "CA2330: Ensure that JsonSerializer has a secure configuration when deserializing (code analysis)" description: Provides information about code analysis rule CA2330, including causes, how to fix violations, and when to suppress it. -ms.date: 08/20/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Ensure that JsonSerializer has a secure configuration when deserializing | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2350.md b/docs/fundamentals/code-analysis/quality-rules/ca2350.md index 1180f15683b10..ec560cacb3cd1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2350.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2350.md @@ -1,7 +1,7 @@ --- title: "CA2350: Ensure DataTable.ReadXml()'s input is trusted (code analysis)" description: "Learn about code analysis rule CA2350: Ensure DataTable.ReadXml()'s input is trusted" -ms.date: 07/14/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Ensure DataTable.ReadXml()'s input is trusted | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2351.md b/docs/fundamentals/code-analysis/quality-rules/ca2351.md index eee89d854fb28..462c5ee492b44 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2351.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2351.md @@ -1,7 +1,7 @@ --- title: "CA2351: Ensure DataSet.ReadXml()'s input is trusted (code analysis)" description: "Learn about code analysis rule CA2351: Ensure DataSet.ReadXml()'s input is trusted" -ms.date: 08/11/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Ensure DataSet.ReadXml()'s input is trusted | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2352.md b/docs/fundamentals/code-analysis/quality-rules/ca2352.md index a769afa83ec3f..c2599c6f76d88 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2352.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2352.md @@ -1,7 +1,7 @@ --- title: "CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks (code analysis)" description: "Learn about code analysis rule CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks" -ms.date: 08/11/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2353.md b/docs/fundamentals/code-analysis/quality-rules/ca2353.md index 1c0568e57157a..b8b98e5c3583e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2353.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2353.md @@ -1,7 +1,7 @@ --- title: "CA2353: Unsafe DataSet or DataTable in serializable type (code analysis)" description: "Learn about code analysis rule CA2353: Unsafe DataSet or DataTable in serializable type" -ms.date: 07/14/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Unsafe DataSet or DataTable in serializable type | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2354.md b/docs/fundamentals/code-analysis/quality-rules/ca2354.md index 292660047d523..7f27ed1b850f6 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2354.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2354.md @@ -1,7 +1,7 @@ --- title: "CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attack (code analysis)" description: "Learn about code analysis rule CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attack" -ms.date: 07/14/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attack | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2355.md b/docs/fundamentals/code-analysis/quality-rules/ca2355.md index 9707dd9a02105..bb0be8f54ca56 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2355.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2355.md @@ -1,7 +1,7 @@ --- title: "CA2355: Unsafe DataSet or DataTable in deserialized object graph (code analysis)" description: "Learn about code analysis rule CA2355: Unsafe DataSet or DataTable in deserialized object graph" -ms.date: 07/14/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Unsafe DataSet or DataTable in deserialized object graph | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2356.md b/docs/fundamentals/code-analysis/quality-rules/ca2356.md index 8b2d13ae58e26..3b4662011c69e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2356.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2356.md @@ -1,7 +1,7 @@ --- title: "CA2356: Unsafe DataSet or DataTable type in web deserialized object graph (code analysis)" description: "Learn about code analysis rule CA2356: Unsafe DataSet or DataTable type in web deserialized object graph" -ms.date: 07/14/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Unsafe DataSet or DataTable type in web deserialized object graph | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2361.md b/docs/fundamentals/code-analysis/quality-rules/ca2361.md index 33cbfd4faa85c..f11d3d7ba62da 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2361.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2361.md @@ -1,7 +1,7 @@ --- title: "CA2361: Ensure autogenerated class containing DataSet.ReadXml() is not used with untrusted data (code analysis)" description: "Learn about code analysis rule CA2361: Ensure autogenerated class containing DataSet.ReadXml() is not used with untrusted data" -ms.date: 08/11/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Ensure autogenerated class containing DataSet.ReadXml() is not used with untrusted data | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca2362.md b/docs/fundamentals/code-analysis/quality-rules/ca2362.md index 009b9f09362d8..94218ee10f95e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca2362.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca2362.md @@ -1,7 +1,7 @@ --- title: "CA2362: Unsafe DataSet or DataTable in autogenerated serializable type can be vulnerable to remote code execution attacks (code analysis)" description: "Learn about code analysis rule CA2362: Unsafe DataSet or DataTable in autogenerated serializable type can be vulnerable to remote code execution attacks" -ms.date: 08/11/2020 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Unsafe DataSet or DataTable in autogenerated serializable type can be vulnerable to remote code execution attacks | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3001.md b/docs/fundamentals/code-analysis/quality-rules/ca3001.md index 8b3a5d305d2dd..6097a65c4d56c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3001.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3001.md @@ -1,7 +1,7 @@ --- title: "CA3001: Review code for SQL injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3001: Review code for SQL injection vulnerabilities, where potentially untrusted input reaches an SQL command's text." -ms.date: 10/19/2026 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ ms.custom: sfi-ropc-nochange | **Title** | Review code for SQL injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3002.md b/docs/fundamentals/code-analysis/quality-rules/ca3002.md index bf5051c5edc1a..29384c6ad84a8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3002.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3002.md @@ -1,7 +1,7 @@ --- title: "CA3002: Review code for XSS vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3002: Review code for XSS vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for XSS vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3003.md b/docs/fundamentals/code-analysis/quality-rules/ca3003.md index 6a2b391a61ab5..fe689e5b0d8a1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3003.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3003.md @@ -1,7 +1,7 @@ --- title: "CA3003: Review code for file path injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3003: Review code for file path injection vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for file path injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3004.md b/docs/fundamentals/code-analysis/quality-rules/ca3004.md index 6759860d8f13a..286cb54df54c6 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3004.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3004.md @@ -1,7 +1,7 @@ --- title: "CA3004: Review code for information disclosure vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3004: Review code for information disclosure vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for information disclosure vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3005.md b/docs/fundamentals/code-analysis/quality-rules/ca3005.md index 55d44d453d5cc..09d738c0d4530 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3005.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3005.md @@ -1,7 +1,7 @@ --- title: "CA3005: Review code for LDAP injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3005: Review code for LDAP injection vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for LDAP injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3006.md b/docs/fundamentals/code-analysis/quality-rules/ca3006.md index fddba0d839d56..530569ecabab8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3006.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3006.md @@ -1,7 +1,7 @@ --- title: "CA3006: Review code for process command injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3006: Review code for process command injection vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for process command injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3007.md b/docs/fundamentals/code-analysis/quality-rules/ca3007.md index 3f031fbdd7abd..1ff981c96dea0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3007.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3007.md @@ -1,7 +1,7 @@ --- title: "CA3007: Review code for open redirect vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3007: Review code for open redirect vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for open redirect vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3008.md b/docs/fundamentals/code-analysis/quality-rules/ca3008.md index 4c3dd6f07e192..2971fbd2038b0 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3008.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3008.md @@ -1,7 +1,7 @@ --- title: "CA3008: Review code for XPath injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3008: Review code for XPath injection vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for XPath injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3009.md b/docs/fundamentals/code-analysis/quality-rules/ca3009.md index 97ff9f1a69dd9..e2cf1d6c7306c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3009.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3009.md @@ -1,7 +1,7 @@ --- title: "CA3009: Review code for XML injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3009: Review code for XML injection vulnerabilities" -ms.date: 07/19/2023 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for XML injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3010.md b/docs/fundamentals/code-analysis/quality-rules/ca3010.md index 16e69ff87a50b..37706b186d38d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3010.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3010.md @@ -1,7 +1,7 @@ --- title: "CA3010: Review code for XAML injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3010: Review code for XAML injection vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for XAML injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3011.md b/docs/fundamentals/code-analysis/quality-rules/ca3011.md index 21d545f20ea38..63610cc104e2b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3011.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3011.md @@ -1,7 +1,7 @@ --- title: "CA3011: Review code for DLL injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3011: Review code for DLL injection vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for DLL injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3012.md b/docs/fundamentals/code-analysis/quality-rules/ca3012.md index 82640e38b4a42..4f8ee7188311e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3012.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3012.md @@ -1,7 +1,7 @@ --- title: "CA3012: Review code for regex injection vulnerabilities (code analysis)" description: "Learn about code analysis rule CA3012: Review code for regex injection vulnerabilities" -ms.date: 04/03/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Review code for regex injection vulnerabilities | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3061.md b/docs/fundamentals/code-analysis/quality-rules/ca3061.md index 88ae8d7f2c141..9718a1efc602e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3061.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3061.md @@ -1,7 +1,7 @@ --- title: "CA3061: Do not add schema by URL (code analysis)" description: Provides information about code analysis rule CA3061, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Do not add schema by URL | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3075.md b/docs/fundamentals/code-analysis/quality-rules/ca3075.md index 6511993c41dce..0371c8e1cfe8b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3075.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3075.md @@ -1,7 +1,7 @@ --- title: "CA3075: Insecure DTD Processing (code analysis)" description: "Learn about code analysis rule CA3075: Insecure DTD Processing" -ms.date: 03/18/2019 +ms.date: 11/12/2026 f1_keywords: - CA3075 --- @@ -13,7 +13,7 @@ f1_keywords: | **Title** | Insecure DTD Processing | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3076.md b/docs/fundamentals/code-analysis/quality-rules/ca3076.md index 9e4b6f30d022d..209fc667e8aa2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3076.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3076.md @@ -1,7 +1,7 @@ --- title: "CA3076: Insecure XSLT Script Execution (code analysis)" description: "Learn about code analysis rule CA3076: Insecure XSLT Script Execution" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA3076 --- @@ -13,7 +13,7 @@ f1_keywords: | **Title** | Insecure XSLT Script Execution | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3077.md b/docs/fundamentals/code-analysis/quality-rules/ca3077.md index 3cff4a7e71c66..1416542fd0349 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3077.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3077.md @@ -1,7 +1,7 @@ --- title: "CA3077: Insecure Processing in API Design, XML Document and XML Text Reader (code analysis)" description: "Learn about code analysis rule CA3077: Insecure Processing in API Design, XML Document and XML Text Reader" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA3077 --- @@ -13,7 +13,7 @@ f1_keywords: | **Title** | Insecure Processing in API Design, XML Document and XML Text Reader | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca3147.md b/docs/fundamentals/code-analysis/quality-rules/ca3147.md index 105f6b4efad7c..aa4c677716fb8 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca3147.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca3147.md @@ -1,7 +1,7 @@ --- title: "CA3147: Mark verb handlers with ValidateAntiForgeryToken (code analysis)" description: "Learn about code analysis rule CA3147: Mark verb handlers with ValidateAntiForgeryToken" -ms.date: 08/08/2018 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Mark verb handlers with ValidateAntiForgeryToken | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5350.md b/docs/fundamentals/code-analysis/quality-rules/ca5350.md index 526a10ba03b0e..9c11d06d21485 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5350.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5350.md @@ -1,7 +1,7 @@ --- title: "CA5350: Do Not Use Weak Cryptographic Algorithms (code analysis)" description: "Learn about code analysis rule CA5350: Do Not Use Weak Cryptographic Algorithms" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA5350 --- @@ -13,7 +13,7 @@ f1_keywords: | **Title** | Do Not Use Weak Cryptographic Algorithms | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | > [!NOTE] diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5351.md b/docs/fundamentals/code-analysis/quality-rules/ca5351.md index 54483ec6996ae..9c78d25e3af42 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5351.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5351.md @@ -1,7 +1,7 @@ --- title: "CA5351: Do Not Use Broken Cryptographic Algorithms (code analysis)" description: "Learn about code analysis rule CA5351: Do Not Use Broken Cryptographic Algorithms" -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - CA5351 --- @@ -13,7 +13,7 @@ f1_keywords: | **Title** | Do Not Use Broken Cryptographic Algorithms | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | > [!NOTE] diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5358.md b/docs/fundamentals/code-analysis/quality-rules/ca5358.md index 664c8c72f1ed5..953d9975bbea5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5358.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5358.md @@ -1,7 +1,7 @@ --- title: "CA5358: Do Not Use Unsafe Cipher Modes (code analysis)" description: Provides information about code analysis rule CA5358, including causes, how to fix violations, and when to suppress it. -ms.date: 01/07/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Do Not Use Unsafe Cipher Modes | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5359.md b/docs/fundamentals/code-analysis/quality-rules/ca5359.md index aa5bbc754ad8d..d0fe5262b9373 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5359.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5359.md @@ -1,7 +1,7 @@ --- title: "CA5359: Do not disable certificate validation (code analysis)" description: Provides information about code analysis rule CA5359, including causes, how to fix violations, and when to suppress it. -ms.date: 05/07/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do not disable certificate validation | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5360.md b/docs/fundamentals/code-analysis/quality-rules/ca5360.md index a59db7845c504..d367dfcd938f2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5360.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5360.md @@ -1,7 +1,7 @@ --- title: "CA5360: Do not call dangerous methods in deserialization (code analysis)" description: Provides information about code analysis rule CA5360, including causes, how to fix violations, and when to suppress it. -ms.date: 05/27/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Do not call dangerous methods in deserialization | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5361.md b/docs/fundamentals/code-analysis/quality-rules/ca5361.md index c49f5796a0dcb..619c4a4b7146d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5361.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5361.md @@ -1,7 +1,7 @@ --- title: "CA5361: Do not disable SChannel use of strong crypto (code analysis)" description: Provides information about code analysis rule CA5361, including causes, how to fix violations, and when to suppress it. -ms.date: 07/12/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not disable SChannel use of strong crypto | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5362.md b/docs/fundamentals/code-analysis/quality-rules/ca5362.md index 89291fb3d53bc..20ae5df7f7dd3 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5362.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5362.md @@ -1,7 +1,7 @@ --- title: "CA5362: Potential reference cycle in deserialized object graph (code analysis)" description: Provides information about code analysis rule CA5362, including causes, how to fix violations, and when to suppress it. -ms.date: 07/29/2026 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Potential reference cycle in deserialized object graph | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5363.md b/docs/fundamentals/code-analysis/quality-rules/ca5363.md index fa3daa6a00485..943add4662921 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5363.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5363.md @@ -1,7 +1,7 @@ --- title: "CA5363: Do not disable request validation (code analysis)" description: Provides information about code analysis rule CA5363, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Do not disable request validation | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5364.md b/docs/fundamentals/code-analysis/quality-rules/ca5364.md index ed10b8f7ad473..177d495beb7d4 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5364.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5364.md @@ -1,7 +1,7 @@ --- title: "CA5364: Do not use deprecated security protocols (code analysis)" description: Provides information about code analysis rule CA5364, including causes, how to fix violations, and when to suppress it. -ms.date: 07/12/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Do not use deprecated security protocols | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5365.md b/docs/fundamentals/code-analysis/quality-rules/ca5365.md index 14048e8e2a253..b1237f4fc9d17 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5365.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5365.md @@ -1,7 +1,7 @@ --- title: "CA5365: Do Not Disable HTTP Header Checking (code analysis)" description: Provides information about code analysis rule CA5365, including causes, how to fix violations, and when to suppress it. -ms.date: 04/29/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do Not Disable HTTP Header Checking | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5366.md b/docs/fundamentals/code-analysis/quality-rules/ca5366.md index 2eac598867df6..446e5bbb5cd9f 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5366.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5366.md @@ -1,7 +1,7 @@ --- title: "CA5366: Use XmlReader For DataSet Read XML (code analysis)" description: Provides information about code analysis rule CA5366, including causes, how to fix violations, and when to suppress it. -ms.date: 04/30/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Use XmlReader For DataSet Read XML | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5367.md b/docs/fundamentals/code-analysis/quality-rules/ca5367.md index fd5b5dcccee9e..6e0b42ffcbdcc 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5367.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5367.md @@ -1,7 +1,7 @@ --- title: "CA5367: Do not serialize types with pointer fields (code analysis)" description: Provides information about code analysis rule CA5367, including causes, how to fix violations, and when to suppress it. -ms.date: 04/30/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do not serialize types with pointer fields | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5368.md b/docs/fundamentals/code-analysis/quality-rules/ca5368.md index 842c73a6346e8..0984f8cd645f3 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5368.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5368.md @@ -1,7 +1,7 @@ --- title: "CA5368: Set ViewStateUserKey For Classes Derived From Page (code analysis)" description: Provides information about code analysis rule CA5368, including causes, how to fix violations, and when to suppress it. -ms.date: 05/07/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Set ViewStateUserKey For Classes Derived From Page | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5369.md b/docs/fundamentals/code-analysis/quality-rules/ca5369.md index c10ee8fd32733..97c8ff00486bf 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5369.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5369.md @@ -1,7 +1,7 @@ --- title: "CA5369: Use XmlReader for Deserialize (code analysis)" description: Provides information about code analysis rule CA5369, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Use XmlReader for Deserialize | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5370.md b/docs/fundamentals/code-analysis/quality-rules/ca5370.md index d02467e63c79e..a1b4f4673e60e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5370.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5370.md @@ -1,7 +1,7 @@ --- title: "CA5370: Use XmlReader for validating reader (code analysis)" description: Provides information about code analysis rule CA5370, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Use XmlReader for validating reader | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5371.md b/docs/fundamentals/code-analysis/quality-rules/ca5371.md index 78254847b9a6e..0be3b4ef80904 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5371.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5371.md @@ -1,7 +1,7 @@ --- title: "CA5371: Use XmlReader for schema read (code analysis)" description: Provides information about code analysis rule CA5371, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Use XmlReader for schema read | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5372.md b/docs/fundamentals/code-analysis/quality-rules/ca5372.md index 00633e96251d9..4e8bff67a4182 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5372.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5372.md @@ -1,7 +1,7 @@ --- title: "CA5372: Use XmlReader for XPathDocument (code analysis)" description: Provides information about code analysis rule CA5372, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Use XmlReader for XPathDocument | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5373.md b/docs/fundamentals/code-analysis/quality-rules/ca5373.md index c2baeadb339af..0c057b8f8288c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5373.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5373.md @@ -1,7 +1,7 @@ --- title: "CA5373: Do not use obsolete key derivation function (code analysis)" description: Provides information about code analysis rule CA5373, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Do not use obsolete key derivation function | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5374.md b/docs/fundamentals/code-analysis/quality-rules/ca5374.md index ca417ca52d03d..d8289b5b8c4e1 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5374.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5374.md @@ -1,7 +1,7 @@ --- title: "CA5374: Do not use XslTransform (code analysis)" description: Provides information about code analysis rule CA5374, including causes, how to fix violations, and when to suppress it. -ms.date: 04/28/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Do not use XslTransform | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5375.md b/docs/fundamentals/code-analysis/quality-rules/ca5375.md index 098033a0aad41..cfa2aad69d877 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5375.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5375.md @@ -1,7 +1,7 @@ --- title: "CA5375: Do not use account shared access signature (code analysis)" description: Provides information about code analysis rule CA5375, including causes, how to fix violations, and when to suppress it. -ms.date: 05/19/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Do not use account shared access signature | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5376.md b/docs/fundamentals/code-analysis/quality-rules/ca5376.md index 1fe0ff2e088b8..b3f6b66bd1532 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5376.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5376.md @@ -1,7 +1,7 @@ --- title: "CA5376: Use SharedAccessProtocol HttpsOnly (code analysis)" description: Provides information about code analysis rule CA5376, including causes, how to fix violations, and when to suppress it. -ms.date: 05/19/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Use SharedAccessProtocol HttpsOnly | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5377.md b/docs/fundamentals/code-analysis/quality-rules/ca5377.md index a8473bfbb05b2..226cac65b3fa9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5377.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5377.md @@ -1,7 +1,7 @@ --- title: "CA5377: Use container level access policy (code analysis)" description: Provides information about code analysis rule CA5377, including causes, how to fix violations, and when to suppress it. -ms.date: 05/19/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Use container level access policy | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5378.md b/docs/fundamentals/code-analysis/quality-rules/ca5378.md index 8a70e447a0d47..b9d9c5a3672e2 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5378.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5378.md @@ -1,7 +1,7 @@ --- title: "CA5378: Do not disable ServicePointManagerSecurityProtocols (code analysis)" description: Provides information about code analysis rule CA5378, including causes, how to fix violations, and when to suppress it. -ms.date: 07/12/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -19,7 +19,7 @@ f1_keywords: | **Title** | Do not disable ServicePointManagerSecurityProtocols | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5379.md b/docs/fundamentals/code-analysis/quality-rules/ca5379.md index 4a443e9720bd0..2c77885a68330 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5379.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5379.md @@ -1,7 +1,7 @@ --- title: "CA5379: Ensure key derivation function algorithm is sufficiently strong (code analysis)" description: Provides information about code analysis rule CA5379, including causes, how to fix violations, and when to suppress it. -ms.date: 05/07/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Ensure key derivation function algorithm is sufficiently strong | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5380.md b/docs/fundamentals/code-analysis/quality-rules/ca5380.md index 53d4ddbe2aab9..c607326d600e9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5380.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5380.md @@ -1,7 +1,7 @@ --- title: "CA5380: Do not add certificates to root store (code analysis)" description: Provides information about code analysis rule CA5380, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Do not add certificates to root store | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5381.md b/docs/fundamentals/code-analysis/quality-rules/ca5381.md index 9353467be5ffd..486bb73cbc97c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5381.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5381.md @@ -1,7 +1,7 @@ --- title: "CA5381: Ensure certificates are not added to root store (code analysis)" description: Provides information about code analysis rule CA5381, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Ensure certificates are not added to root store | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5382.md b/docs/fundamentals/code-analysis/quality-rules/ca5382.md index 2860992c8e428..ce1ac25b0efdd 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5382.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5382.md @@ -1,7 +1,7 @@ --- title: "CA5382: Use secure cookies in ASP.NET Core (code analysis)" description: Provides information about code analysis rule CA5382, including causes, how to fix violations, and when to suppress it. -ms.date: 05/07/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Use secure cookies in ASP.NET Core | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5383.md b/docs/fundamentals/code-analysis/quality-rules/ca5383.md index fd82fbc7759be..c3e2c25193847 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5383.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5383.md @@ -1,7 +1,7 @@ --- title: "CA5383: Ensure use secure cookies in ASP.NET Core (code analysis)" description: Provides information about code analysis rule CA5383, including causes, how to fix violations, and when to suppress it. -ms.date: 05/07/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Ensure use secure cookies in ASP.NET Core | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5384.md b/docs/fundamentals/code-analysis/quality-rules/ca5384.md index 81a1a7d36ad20..f19bc8fa8158e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5384.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5384.md @@ -1,7 +1,7 @@ --- title: "CA5384: Do not use digital signature algorithm (DSA) (code analysis)" description: Provides information about code analysis rule CA5384, including causes, how to fix violations, and when to suppress it. -ms.date: 05/18/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Do not use digital signature algorithm (DSA) | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5385.md b/docs/fundamentals/code-analysis/quality-rules/ca5385.md index 4de00d7e9765a..70563696609e5 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5385.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5385.md @@ -1,7 +1,7 @@ --- title: "CA5385: Use Rivest–Shamir–Adleman (RSA) algorithm with sufficient key size (code analysis)" description: Provides information about code analysis rule CA5385, including causes, how to fix violations, and when to suppress it. -ms.date: 05/18/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -16,7 +16,7 @@ f1_keywords: | **Title** | Use Rivest–Shamir–Adleman (RSA) algorithm with sufficient key size | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5386.md b/docs/fundamentals/code-analysis/quality-rules/ca5386.md index 818562b746f0b..88632a6e3690b 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5386.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5386.md @@ -1,7 +1,7 @@ --- title: "CA5386: Avoid hardcoding SecurityProtocolType value (code analysis)" description: Provides information about code analysis rule CA5386, including causes, how to fix violations, and when to suppress it. -ms.date: 07/12/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Avoid hardcoding SecurityProtocolType value | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5387.md b/docs/fundamentals/code-analysis/quality-rules/ca5387.md index 5637c9177094c..877acb446b2d9 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5387.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5387.md @@ -1,7 +1,7 @@ --- title: "CA5387: Do not use weak key derivation function with insufficient iteration count (code analysis)" description: Provides information about code analysis rule CA5387, including causes, how to fix violations, and when to suppress it. -ms.date: 05/08/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do not use weak key derivation function with insufficient iteration count | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5388.md b/docs/fundamentals/code-analysis/quality-rules/ca5388.md index e05228ffd8854..793be7207cddc 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5388.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5388.md @@ -1,7 +1,7 @@ --- title: "CA5388: Ensure sufficient iteration count when using weak key derivation function (code analysis)" description: Provides information about code analysis rule CA5388, including causes, how to fix violations, and when to suppress it. -ms.date: 05/08/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Ensure sufficient iteration count when using weak key derivation function | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5389.md b/docs/fundamentals/code-analysis/quality-rules/ca5389.md index 0e959cd1bd2cf..1077699d99b03 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5389.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5389.md @@ -1,7 +1,7 @@ --- title: "CA5389: Do not add archive item's path to the target file system path (code analysis)" description: Provides information about code analysis rule CA5389, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: filipsebesta dev_langs: - CSharp @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Do not add archive item's path to the target file system path | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5390.md b/docs/fundamentals/code-analysis/quality-rules/ca5390.md index 438c95d4579f4..8b03ec297c401 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5390.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5390.md @@ -1,7 +1,7 @@ --- title: "CA5390: Do not hard-code encryption key (code analysis)" description: Provides information about code analysis rule CA5390, including causes, how to fix violations, and when to suppress it. -ms.date: 05/08/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do not hard-code encryption key | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5391.md b/docs/fundamentals/code-analysis/quality-rules/ca5391.md index ad7e7a5534c22..fff4f763be48d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5391.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5391.md @@ -1,7 +1,7 @@ --- title: "CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers (code analysis)" description: Provides information about code analysis rule CA5391, including causes, how to fix violations, and when to suppress it. -ms.date: 05/27/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Use antiforgery tokens in ASP.NET Core MVC controllers | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5392.md b/docs/fundamentals/code-analysis/quality-rules/ca5392.md index c9301e341d439..df895a9f3d3cb 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5392.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5392.md @@ -1,7 +1,7 @@ --- title: "CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes (code analysis)" description: Provides information about code analysis rule CA5392, including causes, how to fix violations, and when to suppress it. -ms.date: 05/28/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Use DefaultDllImportSearchPaths attribute for P/Invokes | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5393.md b/docs/fundamentals/code-analysis/quality-rules/ca5393.md index 4e8dffaf906e4..f019410a1b960 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5393.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5393.md @@ -1,7 +1,7 @@ --- title: "CA5393: Do not use unsafe DllImportSearchPath value (code analysis)" description: Provides information about code analysis rule CA5393, including causes, how to fix violations, and when to suppress it. -ms.date: 05/28/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do not use unsafe DllImportSearchPath value | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5394.md b/docs/fundamentals/code-analysis/quality-rules/ca5394.md index 93c1079b8d028..9497b9fa466af 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5394.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5394.md @@ -1,7 +1,7 @@ --- title: "CA5394: Do not use insecure randomness (code analysis)" description: Provides information about code analysis rule CA5394, including causes, how to fix violations, and when to suppress it. -ms.date: 05/08/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do not use insecure randomness | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5395.md b/docs/fundamentals/code-analysis/quality-rules/ca5395.md index 48c5890431c3f..14fbb20b9e540 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5395.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5395.md @@ -1,7 +1,7 @@ --- title: "CA5395: Miss HttpVerb attribute for action methods (code analysis)" description: Provides information about code analysis rule CA5395, including causes, how to fix violations, and when to suppress it. -ms.date: 05/27/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Miss HttpVerb attribute for action methods | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5396.md b/docs/fundamentals/code-analysis/quality-rules/ca5396.md index b3e5306c686a8..ae1007abdac6c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5396.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5396.md @@ -1,7 +1,7 @@ --- title: "CA5396: Set HttpOnly to true for HttpCookie (code analysis)" description: Provides information about code analysis rule CA5396, including causes, how to fix violations, and when to suppress it. -ms.date: 05/11/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Set HttpOnly to true for HttpCookie | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5397.md b/docs/fundamentals/code-analysis/quality-rules/ca5397.md index 862a9d98e92a1..f1598d3e9b61e 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5397.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5397.md @@ -1,7 +1,7 @@ --- title: "CA5397: Do not use deprecated SslProtocols values (code analysis)" description: Provides information about code analysis rule CA5397, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Do not use deprecated SslProtocols values | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5398.md b/docs/fundamentals/code-analysis/quality-rules/ca5398.md index 4c278b6ce0d21..d3d3ea4ef29c4 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5398.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5398.md @@ -1,7 +1,7 @@ --- title: "CA5398: Avoid hardcoded SslProtocols values (code analysis)" description: Provides information about code analysis rule CA5398, including causes, how to fix violations, and when to suppress it. -ms.date: 08/14/2019 +ms.date: 11/12/2026 author: dotpaul ms.author: paulming dev_langs: @@ -18,7 +18,7 @@ f1_keywords: | **Title** | Avoid hardcoded SslProtocols values | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5399.md b/docs/fundamentals/code-analysis/quality-rules/ca5399.md index d081cd30d7dae..1ccec08b1a540 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5399.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5399.md @@ -1,7 +1,7 @@ --- title: "CA5399: Definitely disable HttpClient certificate revocation list check (code analysis)" description: Provides information about code analysis rule CA5399, including causes, how to fix violations, and when to suppress it. -ms.date: 05/18/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Enable HttpClient certificate revocation list check | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5400.md b/docs/fundamentals/code-analysis/quality-rules/ca5400.md index a1e8982aad5ce..427e069d10f98 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5400.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5400.md @@ -1,7 +1,7 @@ --- title: "CA5400: Ensure HttpClient certificate revocation list check is not disabled (code analysis)" description: Provides information about code analysis rule CA5400, including causes, how to fix violations, and when to suppress it. -ms.date: 05/18/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Ensure HttpClient certificate revocation list check is not disabled | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5401.md b/docs/fundamentals/code-analysis/quality-rules/ca5401.md index 63207847fd964..e8377b96a79db 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5401.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5401.md @@ -1,7 +1,7 @@ --- title: "CA5401: Do not use CreateEncryptor with non-default IV (code analysis)" description: Provides information about code analysis rule CA5401, including causes, how to fix violations, and when to suppress it. -ms.date: 05/13/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Do not use CreateEncryptor with non-default IV | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5402.md b/docs/fundamentals/code-analysis/quality-rules/ca5402.md index 12b0897b33d2c..805c3c0ed5765 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5402.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5402.md @@ -1,7 +1,7 @@ --- title: "CA5402: Use CreateEncryptor with the default IV (code analysis)" description: Provides information about code analysis rule CA5402, including causes, how to fix violations, and when to suppress it. -ms.date: 05/13/2020 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche f1_keywords: @@ -15,7 +15,7 @@ f1_keywords: | **Title** | Use CreateEncryptor with the default IV | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5403.md b/docs/fundamentals/code-analysis/quality-rules/ca5403.md index 22a5a74ec12d3..6ebb15123e56d 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5403.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5403.md @@ -1,7 +1,7 @@ --- title: "CA5403: Do not hard-code certificate (code analysis)" description: Provides information about code analysis rule CA5403, including causes, how to fix violations, and when to suppress it. -ms.date: 10/16/2019 +ms.date: 11/12/2026 author: LLLXXXCCC ms.author: linche dev_langs: @@ -17,7 +17,7 @@ f1_keywords: | **Title** | Do not hard-code certificate | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5404.md b/docs/fundamentals/code-analysis/quality-rules/ca5404.md index f0824619fffcc..2ba4b36a707c7 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5404.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5404.md @@ -1,7 +1,7 @@ --- title: "CA5404: Do not disable token validation checks (code analysis)" description: Provides information about code analysis rule CA5404, including causes, how to fix violations, and when to suppress it. -ms.date: 09/01/2021 +ms.date: 11/12/2026 ms.author: timhann f1_keywords: - "CA5404" @@ -14,7 +14,7 @@ f1_keywords: | **Title** | Do not disable token validation checks | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/ca5405.md b/docs/fundamentals/code-analysis/quality-rules/ca5405.md index 4e68f6466a113..0dfa8e6e16b40 100644 --- a/docs/fundamentals/code-analysis/quality-rules/ca5405.md +++ b/docs/fundamentals/code-analysis/quality-rules/ca5405.md @@ -1,7 +1,7 @@ --- title: "CA5405: Do not always skip token validation in delegates (code analysis)" description: Provides information about code analysis rule CA5405, including causes, how to fix violations, and when to suppress it. -ms.date: 09/01/2021 +ms.date: 11/12/2026 ms.author: timhann f1_keywords: - "CA5405" @@ -14,7 +14,7 @@ f1_keywords: | **Title** | Do not always skip token validation in delegates | | **Category** | [Security](security-warnings.md) | | **Fix is breaking or non-breaking** | Non-breaking | -| **Enabled by default in .NET 10** | No | +| **Enabled by default in .NET 11** | No | | **Applicable languages** | C# and Visual Basic | ## Cause diff --git a/docs/fundamentals/code-analysis/quality-rules/index.md b/docs/fundamentals/code-analysis/quality-rules/index.md index a192ab07e3d81..e70d8a2e39f3c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/index.md +++ b/docs/fundamentals/code-analysis/quality-rules/index.md @@ -1,7 +1,7 @@ --- title: Code quality rules overview description: Learn about all of the available code quality rules for code analysis. -ms.date: 01/31/2024 +ms.date: 11/12/2026 --- # Code quality rules @@ -95,6 +95,7 @@ The following table lists code quality analysis rules. > | [CA1514: Avoid redundant length argument](ca1514.md) | A redundant length argument is used when slicing to the end of a string or buffer. A calculated length can be error-prone and is also unnecessary. | > | [CA1515: Consider making public types internal](ca1515.md) | Unlike a class library, an application's API isn't typically referenced publicly, so types can be marked internal. | > | [CA1516: Use cross-platform intrinsics](ca1516.md) | This rule detects usage of platform-specific intrinsics that can be replaced with an equivalent cross-platform intrinsic instead. | +> | [CA1517: Use `ReadOnlySpan` or `ReadOnlyMemory` instead of `Span` or `Memory`](ca1517.md) | A method parameter uses `Span` or `Memory` even though the method doesn't modify the data. Use its read-only counterpart to clarify intent. | > | [CA1700: Do not name enum values 'Reserved'](ca1700.md) | This rule assumes that an enumeration member that has a name that contains "reserved" is not currently used but is a placeholder to be renamed or removed in a future version. Renaming or removing a member is a breaking change. | > | [CA1707: Identifiers should not contain underscores](ca1707.md) | By convention, identifier names do not contain the underscore (_) character. This rule checks namespaces, types, members, and parameters. | > | [CA1708: Identifiers should differ by more than case](ca1708.md) | Identifiers for namespaces, types, members, and parameters cannot differ only by case because languages that target the common language runtime are not required to be case-sensitive. | @@ -176,6 +177,7 @@ The following table lists code quality analysis rules. > | [CA1873: Avoid potentially expensive logging](ca1873.md) | In many situations, logging is disabled or set to a log level that results in an unnecessary evaluation for logging arguments. | > | [CA1874: Use `Regex.IsMatch`](ca1874.md) | `Regex.IsMatch` is simpler and faster than `Regex.Match(...).Success`. | > | [CA1875: Use `Regex.Count`](ca1875.md) | `Regex.Count` is simpler and faster than `Regex.Matches(...).Count`. | +> | [CA1876: Do not use 'AsParallel' in 'foreach'](ca1876.md) | Calling `AsParallel()` directly in a `foreach` loop doesn't make the loop parallel. Use `Parallel.ForEach` to process each item in parallel. | > | [CA1877: Use 'Path.Combine' or 'Path.Join' overloads](ca1877.md) | When multiple `Path.Combine` or `Path.Join` operations are nested, they can be collapsed into a single operation for better performance and readability. | > | [CA1878: Prefer ReadOnlySpan properties over readonly array fields](ca1878.md) | A private static readonly constant-array field can be replaced with a `ReadOnlySpan` property so the C# compiler can avoid a managed array allocation. | > | [CA2000: Dispose objects before losing scope](ca2000.md) | Because an exceptional event might occur that will prevent the finalizer of an object from running, the object should be explicitly disposed before all references to it are out of scope. | @@ -199,6 +201,8 @@ The following table lists code quality analysis rules. > | [CA2024: Do not use StreamReader.EndOfStream in async methods](ca2024.md) | The property can cause unintended synchronous blocking when no data is buffered. Instead, use directly, which returns `null` when reaching the end of the stream. | > | [CA2025: Do not pass `IDisposable` instances into unawaited tasks](ca2025.md) | Unawaited tasks that use `IDisposable` instances might use those instances long after they have been disposed. Ensure tasks using those instances are completed before the instances are disposed. | > | [CA2026: Prefer JsonElement.Parse over JsonDocument.Parse().RootElement](ca2026.md) | It's more efficient to call `JsonElement.Parse` directly than to call `JsonDocument.Parse().RootElement`. | +> | [CA2027: Cancel Task.Delay after Task.WhenAny completes](ca2027.md) | A noncancelable `Task.Delay` continues to run after another task completes in a `Task.WhenAny` call. | +> | [CA2028: Avoid redundant 'Regex.IsMatch' call before 'Regex.Match'](ca2028.md) | Calling both methods with the same input and pattern evaluates the regular expression twice. Call `Regex.Match` once and check `Match.Success`. | > | [CA2100: Review SQL queries for security vulnerabilities](ca2100.md) | A method sets the System.Data.IDbCommand.CommandText property by using a string that is built from a string argument to the method. This rule assumes that the string argument contains user input. A SQL command string that is built from user input is vulnerable to SQL injection attacks. | > | [CA2101: Specify marshalling for P/Invoke string arguments](ca2101.md) | A platform invoke member allows partially trusted callers, has a string parameter, and does not explicitly marshal the string. This can cause a potential security vulnerability. | > | [CA2109: Review visible event handlers](ca2109.md) | A public or protected event-handling method was detected. Event-handling methods should not be exposed unless absolutely necessary. | diff --git a/docs/fundamentals/code-analysis/quality-rules/maintainability-warnings.md b/docs/fundamentals/code-analysis/quality-rules/maintainability-warnings.md index 2365b9394a2f1..d4bba543ced07 100644 --- a/docs/fundamentals/code-analysis/quality-rules/maintainability-warnings.md +++ b/docs/fundamentals/code-analysis/quality-rules/maintainability-warnings.md @@ -1,7 +1,7 @@ --- title: Maintainability rules (code analysis) description: "Learn about code analysis maintainability rules." -ms.date: 11/04/2016 +ms.date: 11/12/2026 f1_keywords: - vs.codeanalysis.maintainabilityrules helpviewer_keywords: @@ -33,6 +33,7 @@ Maintainability rules support library and application maintenance. | [CA1514: Avoid redundant length argument](ca1514.md) | A redundant length argument is used when slicing to the end of a string or buffer. A calculated length can be error-prone and is also unnecessary. | | [CA1515: Consider making public types internal](ca1515.md) | Unlike a class library, an application's API isn't typically referenced publicly, so types can be marked internal. | | [CA1516: Use cross-platform intrinsics](ca1516.md) | This rule detects usage of platform-specific intrinsics that can be replaced with an equivalent cross-platform intrinsic instead. | +| [CA1517: Use `ReadOnlySpan` or `ReadOnlyMemory` instead of `Span` or `Memory`](ca1517.md) | A method parameter uses `Span` or `Memory` even though the method doesn't modify the data. Use its read-only counterpart to clarify intent. | ## See also diff --git a/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md b/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md index b88c67f01fed8..ec6fdd3269bff 100644 --- a/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md +++ b/docs/fundamentals/code-analysis/quality-rules/performance-warnings.md @@ -1,7 +1,7 @@ --- title: Performance rules (code analysis) description: "Learn about code analysis performance rules." -ms.date: 10/27/2025 +ms.date: 11/12/2026 f1_keywords: - vs.codeanalysis.performancerules helpviewer_keywords: @@ -83,5 +83,6 @@ Performance rules support high-performance libraries and applications. | [CA1873: Avoid potentially expensive logging](ca1873.md) | When logging methods are called, their arguments are evaluated regardless of whether the logging level is enabled. This can result in expensive operations being executed even when the log message won't be written. For better performance, guard expensive logging calls with a check to or use the `LoggerMessage` pattern. | | [CA1874: Use 'Regex.IsMatch'](ca1874.md) | is simpler and faster than `Regex.Match(...).Success`. | | [CA1875: Use 'Regex.Count'](ca1875.md) | is simpler and faster than `Regex.Matches(...).Count`. | +| [CA1876: Do not use 'AsParallel' in 'foreach'](ca1876.md) | Calling `AsParallel()` directly in a `foreach` loop doesn't make the loop parallel. Use `Parallel.ForEach` to process each item in parallel. | | [CA1877: Use 'Path.Combine' or 'Path.Join' overloads](ca1877.md) | Multiple consecutive or operations can be collapsed into a single call using overloads that accept multiple path segments. | | [CA1878: Prefer ReadOnlySpan properties over readonly array fields](ca1878.md) | A private static readonly constant-array field can be replaced with a `ReadOnlySpan` property so the C# compiler can avoid a managed array allocation. | diff --git a/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md b/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md index fcf91febdf241..c2666084d4e01 100644 --- a/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md +++ b/docs/fundamentals/code-analysis/quality-rules/reliability-warnings.md @@ -1,7 +1,7 @@ --- title: Reliability rules (code analysis) description: "Learn about code analysis reliability rules." -ms.date: 10/27/2025 +ms.date: 11/12/2026 f1_keywords: - vs.codeanalysis.reliabilityrules helpviewer_keywords: @@ -36,3 +36,5 @@ Reliability rules support library and application reliability, such as correct m | [CA2024: Do not use StreamReader.EndOfStream in async methods](ca2024.md) | The property can cause unintended synchronous blocking when no data is buffered. Instead, use directly, which returns `null` when reaching the end of the stream. | | [CA2025: Do not pass `IDisposable` instances into unawaited tasks](ca2025.md) | Unawaited tasks that use `IDisposable` instances might use those instances long after they have been disposed. Ensure tasks using those instances are completed before the instances are disposed. | | [CA2026: Prefer JsonElement.Parse over JsonDocument.Parse().RootElement](ca2026.md) | It's more efficient to call directly than to call `JsonDocument.Parse().RootElement`. | +| [CA2027: Cancel Task.Delay after Task.WhenAny completes](ca2027.md) | A noncancelable continues to run after another task completes in a call. | +| [CA2028: Avoid redundant 'Regex.IsMatch' call before 'Regex.Match'](ca2028.md) | Calling both methods with the same input and pattern evaluates the regular expression twice. Call `Regex.Match` once and check `Match.Success`. | diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml index 224a8f2d5b54d..d8285509603e4 100644 --- a/docs/navigate/tools-diagnostics/toc.yml +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -3280,6 +3280,8 @@ items: href: ../../fundamentals/code-analysis/quality-rules/ca1515.md - name: CA1516 href: ../../fundamentals/code-analysis/quality-rules/ca1516.md + - name: CA1517 + href: ../../fundamentals/code-analysis/quality-rules/ca1517.md - name: Naming rules items: - name: Overview @@ -3449,6 +3451,8 @@ items: href: ../../fundamentals/code-analysis/quality-rules/ca1874.md - name: CA1875 href: ../../fundamentals/code-analysis/quality-rules/ca1875.md + - name: CA1876 + href: ../../fundamentals/code-analysis/quality-rules/ca1876.md - name: CA1877 href: ../../fundamentals/code-analysis/quality-rules/ca1877.md - name: CA1878 @@ -3515,6 +3519,10 @@ items: href: ../../fundamentals/code-analysis/quality-rules/ca2025.md - name: CA2026 href: ../../fundamentals/code-analysis/quality-rules/ca2026.md + - name: CA2027 + href: ../../fundamentals/code-analysis/quality-rules/ca2027.md + - name: CA2028 + href: ../../fundamentals/code-analysis/quality-rules/ca2028.md - name: Security rules items: - name: Overview