TreatWarningsAsErrors

Build Warnings Summary

msbuild.log -- 2026-02-12 -- 173 distinct warnings, 14662 total

#CodeDescription
2308CS1591Missing XML comment
2076CA1707Remove underscores from names
1658CS8618Non-nullable uninitialized
882CA2007Call ConfigureAwait
522CS8602Possibly null dereference
493CS8604Possible null argument
391IDE0009Add this qualification
378CS8625Null to non-nullable
374CA1307Specify StringComparison
342CS8600Null to non-nullable type
285IDE1006Naming rule violation
285CA1062Validate public args
268CA2000Dispose objects
222NU1701Package compatibility
221IDE0028Use collection initializer
182CA1305Specify IFormatProvider
182IDE0055Fix formatting
172NU1603Dependency version mismatch
157CA2227Read-only collection props
154IDE0058Unused expression value
150CA1031Catch specific exceptions
143CA1002Do not expose generic lists
143CA2201Reserved exception types
118CS1573Missing param XML tag
80IDE0300Use collection expression
79IDE0130Namespace mismatch
77CS1570Invalid XML in comment
75CS8603Possible null return
71IDE0073File header mismatch
68CA1829Use Length/Count property
59CA1822Mark members as static
58IDE0065Using directive placement
56CA1861Avoid constant arrays as args
55IDE0161Use file-scoped namespace
55CS8601Possible null assignment
52CA1823Avoid unused private fields
52IDE0044Make field readonly
50CA1826Use property not Enumerable
48CA1860Avoid Enumerable.Any()
47IDE0011Add braces
47CS0108Hides inherited member
46CS0618Obsolete member usage
43CA1304Specify CultureInfo
42CA1311Specify culture for strings
39IDE0059Unnecessary assignment
39CA1849Call async in async method
39MSB3277Assembly version conflict
38CA1508Dead conditional code
38IDE0060Remove unused parameter
36CA1851Possible multiple enumerations
36CS8620Nullability mismatch in arg
33CA1725Param names match base
33IDE0090Simplify new expression
32CA1308Normalize to uppercase
32CA1720No type names in identifiers
31CA1852Seal internal types
30CA1310Specify StringComparison
29CS0219Variable assigned not used
28IDE0010Add missing switch cases
26CA1859Use concrete types
26IDE0034Simplify default expression
26SYSLIB1045Use GeneratedRegex
24CA1825Avoid zero-length arrays
24CA2234Pass URIs not strings
23CA1724Type name conflicts namespace
23CS1998Async lacks await
21CA2016Forward CancellationToken
19CS1572Param tag no matching param
18IDE0057Use range operator
18CA1507Use nameof
18IDE0071Simplify interpolation
17CA1819Properties return arrays
16CA1051Visible instance fields
16IDE0017Use object initializers
16CS0168Variable never used
16CA1034Nested types visible
16CA1001Types own disposable fields
15CA1862Use StringComparison
15CA1032Implement exception ctors
15IDE0301Use collection expression
15CA1063Implement IDisposable
14IDE0072Add missing switch cases
14CS8629Nullable value may be null
13CS8632Nullable annotation context
12CS0169Field never used
12CA2254Template should be static
12CA1303Do not pass literals
12IDE0040Add accessibility modifiers
12CA1848Use LoggerMessage delegates
11CA1816Call GC.SuppressFinalize
11CA1068CancellationToken last
11CA1805Unnecessary initialization
11CA1715Identifier prefix
10IDE0305Use collection expression
10IDE0120Simplify LINQ
10CS8605Unboxing possibly null
10CA1869Cache JsonSerializerOptions
9CA1024Use properties
9CS9113Parameter unread
9CA1055URI return not string
9CS9124Param in state machine
9CA2208Correct ArgumentException
8CA1863Use char overload
8CA1854Prefer TryGetValue
8CA1052Seal static holder types
8CS4014Unawaited async call
8CS3021
7ASP0019Use IHeaderDictionary
7CA1827Use Any not Count
7IDE0020Pattern matching null check
7IDE0019Use pattern matching
7CA5399Disable cert check
7CA1716Identifier matches keyword
6CS9107Param captured and assigned
6SYSLIB0026Obsolete MutuallyAuth
6CS8767Nullability in param
6CA1866Use char overload
5CS8765Nullability in override
5CS1587Misplaced XML comment
5CA1834Use StringBuilder char
5CA1309Use ordinal StringComparison
5CA1721Property matches get method
4CA1054URI param not string
4IDE0100Unnecessary equality op
4CA1806Do not ignore results
4IDE0004Remove unnecessary cast
3CA1847Use string.Contains(char)
3CA1836Prefer IsEmpty over Count
3IDE0031Use null propagation
3IDE0027Use expression body
3CA1028Enum storage Int32
3CA2211Non-constant visible fields
3CS8619Nullability mismatch
3IDE0220Add explicit cast
3CS8714Type param constraint
3CS0649Field never assigned
3CS8621Nullability in return type
2CS0114Hides inherited member
2IDE0200
2CA1069Duplicate enum values
2CA1008Enums have zero value
2CA1012Abstract types no ctors
2CA1850Prefer static HashData
2CA1027Mark enums with Flags
2CA5394Insecure randomness
2CA1820Test empty using length
2CA1812
2CA1056URI prop not string
2CA2213Dispose disposable fields
2CA1711Incorrect identifier suffix
2CA1845Use span-based Concat
1IDE0210
1CA2215Call base Dispose
1CS8622Nullability in parameter
1ASP0018Unused route parameter
1CA1016Mark with AssemblyVersion
1CA1033Interface callable by child
1CA1040Avoid empty interfaces
1CA1065Unexpected exception location
1CA1067Override Equals for IEquatable
1CA1416Platform compatibility
1CA1510Use ThrowIfNull
1CA1844Memory-based overrides
1CA1846Prefer AsSpan
1CA1867Use char overload
1CS0162Unreachable code
1CS0659Missing GetHashCode
1CS1571Duplicate param XML tag
1CS1574Unresolved cref
1CS8524Missing enum switch cases
1CS8613Nullability in return
1IDE0056Use index operator
1ASP0000Avoid BuildServiceProvider
14662Total

To put this in perspective, here is a summary of the codebase in question. This is not a large codebase by any stretch: roughly 145,000 lines of C# spread across about a thousand files. And yet, 14,662 warnings. That is roughly one warning for every ten lines of code.

===============================================================================
 Language            Files        Lines         Code     Comments       Blanks
===============================================================================
 Batch                   2           51           36            2           13
 C#                   1028       193547       144963        24483        24101
 Dockerfile              2           43           22            8           13
 JSON                  525       235599       235461            0          138
 MSBuild                40         1414         1251           36          127
 PowerShell              3          449          317           72           60
 Python                  4         1561         1214          107          240
 Shell                   6         1308          955          121          232
 SQL                     6          318          291            2           25
 Plain Text             55         6030            0         5855          175
 Visual Studio Sol       6          415          409            0            6
 YAML                  148        20180        18969          715          496
-------------------------------------------------------------------------------
 Markdown               12         1822            0         1382          440
 |- BASH                 2           60           34           16           10
 |- JSON                 1           31           31            0            0
 |- PowerShell           1            5            4            1            0
 |- Python               1           25           14            7            4
 |- SQL                  1            5            5            0            0
 (Total)                           1948           88         1406          454
===============================================================================
 Total                1837       462737       403888        32783        26066
===============================================================================