The largest C# repositories by lines of code

OctoCounts has measured 309 public GitHub repositories whose primary programming language is C#. dotnet/roslyn is the largest, with 7,250,292 code lines across 24,440 files, counted with tokei on November 24, 2026. The table ranks the 50 largest by code lines; each row links to a report pinned to the commit it counted.

RankRepositoryCode linesTotal linesFilesC# share
1dotnet/roslyn7,250,2929,301,57824,44072.4%
2dotnet/runtime5,045,6757,037,24724,21549.5%
3space-wizards/space-station-143,828,6744,112,02016,23115.7%
4unoplatform/uno1,777,0392,319,78020,84583.7%
5dotnet/corefx1,732,4782,358,10211,38387.4%
6bitwarden/server1,522,4102,073,4986,71886.9%
7CXWorld/CapFrameX1,426,1721,540,8941,85714.7%
8sebastienros/jint1,210,9361,635,7795,17961.2%
9KeenSoftwareHouse/SpaceEngineers1,179,3281,366,7754,17552.7%
10jhaizhou-ops/S2Arm1,146,4451,541,9877,07644.3%
11Epi-Info/Epi-Info-Community-Edition1,048,0071,280,5722,71053.4%
12stride3d/stride995,3111,416,3068,66482.7%
13microsoft/PowerToys954,1091,245,0747,82854.1%
14SubtitleEdit/subtitleedit906,6581,175,6583,50467.1%
15abpframework/abp836,112965,28211,94136.8%
16PowerShell/PowerShell818,1081,225,3803,46757.8%
17Kareadita/Kavita803,2801,038,4003,78667.9%
18microsoft/testfx760,381985,4593,90793.5%
19dotnet/aspnetcore685,7981,008,8559,99274.4%
20nhibernate/nhibernate-core674,395859,7577,58485.9%
21smartstore/SmartStoreNET652,282826,8814,41644.6%
22QuantConnect/Lean651,5211,041,7335,26872.3%
23Devolutions/UniGetUI583,150642,2271,78647.6%
24iamcheyan/Zircon-Godot535,828612,6461,39555.0%
25ppy/osu470,012618,9335,12997.3%
26Ciuntuc-BIM-Studio/lapin461,927564,3222,65146.1%
27Axvser/VeloxDev453,808568,3962,31038.3%
28blitzy-public-samples/StockSharp433,986838,0112,29258.1%
29microsoft/semantic-kernel420,992624,6204,14752.5%
30AvaloniaUI/Avalonia419,775575,3174,35380.2%
31Squidex/squidex416,138524,9574,13839.3%
32JamesNK/Newtonsoft.Json399,583459,54899934.9%
33dotnet/efcore396,736663,0113,30179.9%
34dotnet/roslyn-analyzers392,544452,6971,94794.4%
35Sonarr/Sonarr381,251441,2684,49453.5%
36dotnet/AspNetCore.Docs373,314731,2909,03134.7%
37openutau/OpenUtau355,157400,77288134.4%
38Radarr/Radarr347,706402,8694,52447.3%
39SmartlyDressedGames/U3-SDK343,116440,7722,06098.2%
40LordEnma/YandereSimulatorDecompiled319,459355,3801,876100.0%
41icsharpcode/ILSpy318,295435,9392,23193.1%
42sharpemu/sharpemu317,874532,0221,15094.6%
43dotnet/ef6305,818476,8682,06792.4%
44protobuf-net/protobuf-net288,887399,4151,86458.7%
45NuGet/NuGet.Client280,936403,1912,95485.1%
46tui-cs/Terminal.Gui276,973419,3151,72096.3%
47DorianGrayII/MOM-2022-268,226297,6061,79478.0%
48iOfficeAI/OfficeCLI267,507391,0381,03273.7%
49optimajet/WorkflowEngine.NET267,167316,2722,36848.6%
50BAKAOLC/STS2-RitsuLib237,874334,3791,46692.2%

Ranking rule: a repository belongs to C# when C# is its largest programming language by code lines; data and prose formats such as JSON, YAML, TOML and Markdown do not count as a language for this rule. "C# share" is the share of the repository's code lines written in C#. Code lines exclude comments and blank lines. Every report uses OctoCounts' canonical public options, with tests, docs and generated directories excluded, and reports were generated on different dates.

C# leaderboard FAQ

Which C# repository has the most lines of code?

dotnet/roslyn is the largest C# repository in OctoCounts' index, with 7,250,292 code lines out of 9,301,578 total lines across 24,440 files, counted on November 24, 2026. dotnet/runtime follows with 5,045,675 code lines. Code size is not code quality: a larger count only means more source material.

How does a repository join the C# leaderboard?

C# must be its primary programming language: the language with the most code lines in the repository's OctoCounts report, ignoring data and prose formats such as JSON, YAML, TOML and Markdown. The repository then needs a public report with at least 5 files, and it is listed when it is among the 50 largest by code lines.

How many C# repositories has OctoCounts measured?

309 public GitHub repositories have C# as their primary programming language in OctoCounts' index. This page lists the 50 largest by code lines; a repository analyzed with custom counting options keeps those counts as a separate saved result.

Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use line counts to gauge the scale of what you would be reading or maintaining, not as a quality signal.